WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH 4 of 4] libxl: add statup checks to libxl__wait_f

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 4 of 4] libxl: add statup checks to libxl__wait_for_device_model
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Wed, 4 May 2011 17:23:43 +0100
Cc: Bastian Blank <waldi@xxxxxxxxxx>
Delivery-date: Wed, 04 May 2011 09:24:33 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <36871b37a9bd286d6ef2.1304520672@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Citrix Systems, Inc.
References: <patchbomb.1304520668@xxxxxxxxxxxxxxxxxxxxx> <36871b37a9bd286d6ef2.1304520672@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Wed, 2011-05-04 at 15:51 +0100, Ian Campbell wrote:
> # HG changeset patch
> # User Ian Campbell <ian.campbell@xxxxxxxxxx>
> # Date 1304516515 -3600
> # Node ID 36871b37a9bd286d6ef291b41513c33325db9719
> # Parent  ec008dc43727191f472cd4bd5e59d9d35d9d36c2
> libxl: add statup checks to libxl__wait_for_device_model
> 
> When the device model is starting up push checks for spawn failure down into
> libxl__wait_for_device_model, allowing us to fail more quickly when the device
> model fails to start (e.g. due to a missing library or an early setup error
> etc).
> 
> In order to allow the select loop in libxl__wait_for_device_model to wake when
> the child dies add pipe between the parent and the intermediate process which
> the intermediate process can use to signal the parent.
> 
> Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

I accidentally removed the close of the read side of the pipes from the
intermediate process while refactoring. So this incremental fix is
needed:

--- a/tools/libxl/libxl_exec.c  Wed May 04 17:03:14 2011 +0100
+++ b/tools/libxl/libxl_exec.c  Wed May 04 17:22:05 2011 +0100
@@ -144,6 +144,7 @@ int libxl__spawn_spawn(libxl__gc *gc,
     }
 
     /* we are now the intermediate process */
+    if (for_spawn) close(pipes[0]);
 
     child = fork();
     if (child == -1)



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel