[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 2/5] libxl: react correctly to POLLHUP
Ian Campbell writes ("Re: [Xen-devel] [PATCH v2 2/5] libxl: react correctly to POLLHUP"): > On Fri, 2012-07-27 at 18:01 +0100, Ian Jackson wrote: > > +static int datacopier_pollhup_handled(libxl__egc *egc, > > + libxl__datacopier_state *dc, > > + short revents, int onwrite) > > +{ > > + STATE_AO_GC(dc->ao); > > + > > + if (dc->callback_pollhup && (revents & POLLHUP)) { > > + LOG(DEBUG, "received POLLHUP on %s during copy of %s", > > + onwrite ? dc->writewhat : dc->readwhat, > > + dc->copywhat); > > + libxl__datacopier_kill(dc); > > + dc->callback(egc, dc, onwrite, -1); > > Shouldn't this be dc->callback_poolhup? Yes. I did say I hadn't executed it :-). > > @@ -508,7 +508,10 @@ static void bootloader_gotptys(libxl__egc *egc, > > libxl__openpty_state *op) > > bl->keystrokes.maxsz = BOOTLOADER_BUF_OUT; > > bl->keystrokes.copywhat = > > GCSPRINTF("bootloader input for domain %"PRIu32, bl->domid); > > - bl->keystrokes.callback = bootloader_keystrokes_copyfail; > > + bl->keystrokes.callback = bootloader_keystrokes_copyfail; > > + bl->keystrokes.callback_pollhup = bootloader_keystrokes_copyfail; > > + /* pollhup gets called with errnoval==-1 which is not otherwise > > + * possible since errnos are nonnegative, so it's unambiguous */ > > So the split into two callbacks is just for convenience of some future > user, rather than something needed in this patch? Or have I missed > somewhere which sets callback but not callback_pollhup? Yes, you have. datacopier is used for the qemu state file during save/restore, and naturally wants to treat pollhup as fatal. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |