From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: [PATCH 0 of 4] libxl: improve error handling when device model fails to start early on Date: Wed, 4 May 2011 15:51:08 +0100 Message-ID: References: <1304440769.18845.136.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1304440769.18845.136.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: Bastian Blank List-Id: xen-devel@lists.xenproject.org Currently when the device model fails to start there is a delay until we timeout and report error, some users have misinterpretted this delay as a hang. To improve this firstly we can add an access(2) sanity check on the device model binary before doing anything. Secondly we can propagate child failures to the parent much quicker by adding a pipe between the intermediate process (which blocks in waitpid() on the child until libxl__spawn_detach is called or the child exits) to allow failure to be reported immediately and with a slightly more specific error message.