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

Re: [Xen-devel] c/s 17731 portability issues



Ian Jackson writes ("Re: [Xen-devel] c/s 17731 portability issues"):
> If you want a more reliable arrangement, we need [something] or for
> qemu-dm to acquire some resource which the kernel will automatically
> clean up when it dies.  Obvious candidates for the latter are a
> descriptor onto a named pipe or a fcntl file lock.  Both of the
> latter should be possible for xend to set up as qemu-dm's
> precedessor-in-exec, without needing changes to qemu-dm itself.

Thinking about it, a named pipe is attractive.  qemu-dm would be
passed the writing end across exec but just keep it and not write
anything to it.  xend would keep the reading end, and when it became
readable could collect the exit status with waitpid (and W_NOHANG).

On restart, xend would attempt to open the fifo again with
O_RDONLY|O_NONBLOCK which would fail EWOUDLBLOCK if qemu-dm was no
longer running.

The implementation is left as an exercise to the reader.  In the
meantime the ps-based checking should be removed.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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