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] Fix bootloader handling when empty string is bei

To: Michal Novotny <minovotn@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Fix bootloader handling when empty string is being output
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Tue, 31 Aug 2010 09:47:37 +0100
Cc: "'xen-devel@xxxxxxxxxxxxxxxxxxx'" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 31 Aug 2010 01:48:34 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4C7BADAA.9080209@xxxxxxxxxx>
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: <4C7BADAA.9080209@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Mon, 2010-08-30 at 14:10 +0100, Michal Novotny wrote:
> Hi,
> this is the patch to fix empty string as the output value
> of the bootloader string. If there is no output then
> xend is being hung indefinitely unless you press Ctrl + C keys
> to trigger SIGINT.

I think a similar fix will be needed to libxl_bootloader.c, right?

A couple of questions:

Couldn't the non-portable usage of /proc be portably replaced with
something like waitpid+WNOHANG? I guess it would be sane to put one of
these inside the loop which performs the bootloader interaction to check
the bootloader still exists.

Could we potentially avoid the need to use a select timeout to poll for
bootloader exit by including the bootloader FIFO FD and/or the PTY FDs
in the select's exceptfds array? Presumably if the process on the other
end of such an FD exits that causes some sort of exceptional condition
(although historically I've had trouble finding the actual specified
behaviour in cases like this).

Ian.



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