[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 2/5] libxl: react correctly to POLLHUP
On Thu, 2012-07-26 at 20:54 +0100, Roger Pau Monne wrote: > When received POLLHUP on datacopier_readable/writable, kill the > datacopier and call the callback with onwrite=-2. On the bootloader > callback kill the bootloader process and wait for the callback, but > without setting the bl->rc error code. > > This is because NetBSD returns POLLHUP when the process on the other > end of the pty exits (even when exiting normally). > > Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> > Signed-off-by: Roger Pau Monne <roger.pau@xxxxxxxxxx> > --- > tools/libxl/libxl_aoutils.c | 16 ++++++++++++++++ > tools/libxl/libxl_bootloader.c | 9 ++++++--- > tools/libxl/libxl_internal.h | 1 + > 3 files changed, 23 insertions(+), 3 deletions(-) > > diff --git a/tools/libxl/libxl_aoutils.c b/tools/libxl/libxl_aoutils.c > index 99972a2..2ea9b2c 100644 > --- a/tools/libxl/libxl_aoutils.c > +++ b/tools/libxl/libxl_aoutils.c > @@ -102,6 +102,14 @@ static void datacopier_readable(libxl__egc *egc, > libxl__ev_fd *ev, > libxl__datacopier_state *dc = CONTAINER_OF(ev, *dc, toread); > STATE_AO_GC(dc->ao); > > + if (revents & POLLHUP) { > + LOG(DEBUG, "received POLLHUP on %s during copy of %s, " > + "killing the bootloader process", The datacopier module is completely independent from the bootloader one, so mentioning bootloader in this message is inappropriate. Especially since nothing in the immediate vicinity of this code is actually killing anything. I'll leave commenting on the semantics of treating POLLHUP this way for Ian to think about. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |