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

Re: [Xen-devel] libxl: spawning qemu while files are open

> On Fri, 2013-10-18 at 15:26 +0000, Rob Hoes wrote:
> > We could solve this by opening the suspend-image file in xenopsd using
> > the O_CLOEXEC flag, causing the file to be closed when executing qemu.
> > However, we are worried that this behaviour may still cause trouble in
> > multi-threaded programs such as xenopsd, unless all files it ever
> > opens are opened with O_CLOEXEC, which is easily forgotten.
> I'm afraid this is exactly what you need to do.
> libxl itself jumps through considerable hoops to ensure it does this itself,
> it's extra hard in a library... (have a look= for CLOEXEC in tools/libxl/*.h 
> for
> some details)

Alright, thanks. I'll look into that.


> xenopsd being the consuming app should have an easier time of it.
> > Would it be possible for libxl to spawn qemu in such a way that it
> > won't inherit open files?
> I don't think POSIX has any functionality which allows for that to be reliably
> implemented.
> Ian.

Xen-devel mailing list



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