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 1/3] xenstored - postpone fork after initializati

To: Bastian Blank <bastian@xxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 1/3] xenstored - postpone fork after initialization
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Thu, 27 Mar 2008 09:15:55 +0000
Delivery-date: Thu, 27 Mar 2008 02:17:14 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20080326110016.GA20300@xxxxxxxxxxxxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AciP6ykeZ71jrPveEdyKuwAX8io7RQ==
Thread-topic: [Xen-devel] [PATCH 1/3] xenstored - postpone fork after initialization
User-agent: Microsoft-Entourage/11.4.0.080122
On 26/3/08 11:00, "Bastian Blank" <bastian@xxxxxxxxxxxx> wrote:

>  HG changeset patch
> # User Bastian Blank <waldi@xxxxxxxxxx>
> # Date 1206528849 -3600
> # Node ID 5e0412c5f5798b5c0acdd4057c91b3820d6c4afd
> # Parent  f5e6cccfdda5537876d6fc2b87ea1124d6043fc8
> Postpone fork after initialization.
> 
> Signed-off-by: Bastian Blank <waldi@xxxxxxxxxx>

I applied all three patches as c/s 17296 and then reverted them in c/s 17304
because they don't work. I think delaying xenstored daemonisation breaks its
startup. Certainly xend itself came up, but xenstore-ls for example did not
work, so clearly xenstored had not initialised properly.

In any case I think it's bad practice to daemonise after initialisation --
if you're going to daemonise it makes sense to do it as early as possible.
Perhaps a better way to go would be to wait for the stdout pipe to be
half-closed? Or to pass switch -P to xenstored and wait for the daemon pid
to be written to the stdout pipe?

 -- Keir



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