|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 6/6] tools/libxl: Fix datacopier POLLHUP handling to not always be fatal
Ian Campbell writes ("Re: [PATCH 6/6] tools/libxl: Fix datacopier POLLHUP
handling to not always be fatal"):
> On Fri, 2015-02-20 at 13:55 +0000, Andrew Cooper wrote:
> > A different and far less invasive approach might be to have a per-fd
> > revent ignore mask. This would at least allow the callbacks to be made
> > when the datacopier is in a consistent state.
>
> Ian, any thoughts on this?
I think there is a real bug but the patch is misconceived :-/.
Andrew says on IRC:
18:02 <andyhhp> Diziet: POLLHUP|POLLIN is a valid revent to recieve
18:03 <andyhhp> which happens when the writer has written into the
pipe and closed the fd
This is true [1] and will indeed cause the datacopier to quit before
it has finished copying all the data, which I think is indeed a bug.
On the other hand, some fd objects can return POLLHUP without other
indications. In those cases we should fail.
I think the right answer is for the dc to ignore POLLHUP iff there are
other bits set which are going to be handled.
Care needs to be taken about how this interacts with
7253e0fd1aeb3ae7d4714bcc1d86b846b3331995
libxl: react correctly to bootloader pty master POLLHUP
Ian.
[1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/poll.html
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |