From: Ian Jackson Subject: Re: [PATCH 1/3] Revert "tools/libxl: Adjust datacopiers POLLHUP handling when the fd is also readable" Date: Thu, 2 Apr 2015 16:27:01 +0100 Message-ID: <21789.24517.237422.280522@mariner.uk.xensource.com> References: <21789.23119.369227.882060@mariner.uk.xensource.com> <1427987045-23435-1-git-send-email-ian.jackson@eu.citrix.com> <1427987333.4037.84.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1427987333.4037.84.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Andrew Cooper , xen-devel@lists.xensource.com, Ross Lagerwall , Wei Liu , Roger Pau =?utf-8?Q?Monn=C3=A9?= List-Id: xen-devel@lists.xenproject.org Ian Campbell writes ("Re: [PATCH 1/3] Revert "tools/libxl: Adjust datacopiers POLLHUP handling when the fd is also readable""): > On Thu, 2015-04-02 at 16:04 +0100, Ian Jackson wrote: > > The bootloader code is relying on detecting POLLHUP, and 7e9ec50b > > breaks that. 7e9ec50b, when handling a pty master, violates the > > specification of the datacopier interface (as defined). > > > > 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 master pty fd start to return EOF > > > > From the point of view of the datacopier these might happen in any > > order. I think there is a latent bug with (c), which I will discuss > > later in this email. > > later in another mail maybe? In 3/3. Oh well, I have pushed it now. Thanks, Ian.