From: Ian Jackson Subject: Re: [PATCH 5/7] libxl: fork: Provide libxl_childproc_sigchld_occurred Date: Fri, 17 Jan 2014 11:27:17 +0000 Message-ID: <21209.5013.712955.967233@mariner.uk.xensource.com> References: <1389892942-8452-1-git-send-email-ian.jackson@eu.citrix.com> <1389892942-8452-6-git-send-email-ian.jackson@eu.citrix.com> <1389957773.6697.76.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1389957773.6697.76.camel@kazak.uk.xensource.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: Jim Fehlig , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Ian Campbell writes ("Re: [PATCH 5/7] libxl: fork: Provide libxl_childproc_sigchld_occurred"): > On Thu, 2014-01-16 at 17:22 +0000, Ian Jackson wrote: > > + /* it must have finished but we don't know its status */ > > + status = 255<<8; /* no wait.h macro for this! */ > > + assert(WIFEXITED(status)); > > + assert(WEXITSTATUS(status)==255); > > + assert(!WIFSIGNALED(status)); > > + assert(!WIFSTOPPED(status)); > > This is quite exciting! How can this happen? Kernel bug or similar? In principle it would be possible (and standards-compliant) for a system to encode its wait status in a different way to usual. I don't think any such system really exists - at least, not one we'll be running libxl on. Of course this code is only reached if DISASTER returns... Ian.