From: Ian Campbell Subject: Re: [PATCH 14/12] libxl: fork: Make SIGCHLD self-pipe nonblocking Date: Tue, 21 Jan 2014 15:32:55 +0000 Message-ID: <1390318375.32519.9.camel@kazak.uk.xensource.com> References: <21214.34859.759826.374311@mariner.uk.xensource.com> <1390317088-21308-1-git-send-email-ian.jackson@eu.citrix.com> <1390317088-21308-2-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1390317088-21308-2-git-send-email-ian.jackson@eu.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 Jackson Cc: Jim Fehlig , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Tue, 2014-01-21 at 15:11 +0000, Ian Jackson wrote: > Use the new libxl__pipe_nonblock and _close functions, rather than > open coding the same logic. Now the pipe is nonblocking, which avoids > a race which could result in libxl deadlocking in a multithreaded > program. Is any additional error handling required at any of the points where the pipe is used, EWOULDBLOCK etc. I think in practice that is all in libxl__self_pipe_wakeup and libxl__self_pipe_eatall, the callers of which treat errors as disaster (with assert and LIBXL__EVENT_DISASTER respectively). But both wakeup and eatall handle EWOULDBLOCK sensibly. Assuming my analysis of what needs to be handled and where it needs to be done matches yours: Acked-by: Ian Campbell