Re: [Xen-devel] [PATCH 3/3] libxl: datacopier: Avoid theoretical eof/POLLHUP race

2015-04-07 Thread Ian Jackson
Roger Pau Monné writes ("Re: [PATCH 3/3] libxl: datacopier: Avoid theoretical eof/POLLHUP race"): > I don't seem to be able to trigger the issue with the debug patch > applied. AFAICT pygrub is blocked (probably because the output buffer > is full) and total execution greatly exceeds 15s seconds

Re: [Xen-devel] [PATCH 3/3] libxl: datacopier: Avoid theoretical eof/POLLHUP race

2015-04-07 Thread Roger Pau Monné
El 02/04/15 a les 18.29, Ian Jackson ha escrit: > Ian Jackson writes ("[PATCH 3/3] libxl: datacopier: Avoid theoretical > eof/POLLHUP race"): >> We solve the race with a poll of the reading fd, to double-check, when >> we detect eof via read. (This is only necessary if the caller has >> specified

Re: [Xen-devel] [PATCH 3/3] libxl: datacopier: Avoid theoretical eof/POLLHUP race

2015-04-02 Thread Ian Jackson
Ian Jackson writes ("[PATCH 3/3] libxl: datacopier: Avoid theoretical eof/POLLHUP race"): > We solve the race with a poll of the reading fd, to double-check, when > we detect eof via read. (This is only necessary if the caller has > specified callback_pollhup, as otherwise POLLHUP|POLLIN - and, >

Re: [Xen-devel] [PATCH 3/3] libxl: datacopier: Avoid theoretical eof/POLLHUP race

2015-04-02 Thread Ian Campbell
On Thu, 2015-04-02 at 16:04 +0100, Ian Jackson wrote: > When the bootloader exits, several things change, all at once: > (a) The master pty fd (held by libxl) starts to signal POLLHUP > and maybe also POLLIN. > (b) The child exits (so that the SIGCHLD self-pipe signals POLLIN, > which wil

[Xen-devel] [PATCH 3/3] libxl: datacopier: Avoid theoretical eof/POLLHUP race

2015-04-02 Thread Ian Jackson
When the bootloader exits, several things change, all at once: (a) The master pty fd (held by libxl) starts to signal POLLHUP and maybe also POLLIN. (b) The child exits (so that the SIGCHLD self-pipe signals POLLIN, which will be handled by the libxl child process code. (c) reads on the