Files
xen/tools/libxl
Andrew Cooper 7e9ec50b05 tools/libxl: Adjust datacopiers POLLHUP handling when the fd is also readable
POLLHUP|POLLIN is a valid revent to receive when there is readable data in a
pipe, but the writable fd has been closed.  This occurs in migration v2 when
the legacy conversion process (which transforms the data inline) completes and
exits successfully.

In the case that there is data to read, suppress the POLLHUP.  POSIX states
that the hangup state is latched[1], which means it will reoccur on subsequent
poll() calls.  The datacopier is thus provided the opportunity to read until
EOF, if possible.

A POLLHUP on its own is treated exactly as before, indicating a different
error with the fd.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/poll.html

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Ian Campbell <Ian.Campbell@citrix.com>
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-03-18 11:31:58 +00:00
..
2013-10-10 15:48:55 +01:00
2012-10-05 14:34:30 +01:00
2014-07-10 13:06:55 +01:00
2014-06-18 17:19:25 +01:00
2014-06-18 17:19:25 +01:00
2014-05-02 17:50:23 +01:00
2013-10-10 15:48:55 +01:00
2011-10-12 16:21:32 +01:00
2015-01-19 15:32:17 +00:00
2015-01-27 16:34:05 +00:00