[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] libxl: use libxl_fd_set_{cloexec, nonblock} helpers



On Mon, 2014-07-28 at 15:51 +0100, David Vrabel wrote:
>  
> > And of course I'd be perfectly fine with a one liner just dropping it
> > (all I really care about is that the file builds correctly in all cases).
> > The question of why cloexec is needed/wanted here I'll pass on to
> > author and committer, but I'd guess this is just to avoid
> > proliferation of file handles into clones.
> 
> Surely it should be standard practice for a library to always set
> CLOEXEC on any files it opens, to minimize the side effects the library
> call has?
> 
> And if CLOEXEC is required then setting it at open time is the only safe
> way.

Jan's problem (according to the commit log) is that O_CLOEXEC isn't
universally available yet.

Fortunately libxl has the carefd infrastructure which offers an
alternative.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.