From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH 1/3] xenstored - postpone fork after initialization Date: Thu, 27 Mar 2008 09:15:55 +0000 Message-ID: References: <20080326110016.GA20300@wavehammer.waldi.eu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20080326110016.GA20300@wavehammer.waldi.eu.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Bastian Blank , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 26/3/08 11:00, "Bastian Blank" wrote: > HG changeset patch > # User Bastian Blank > # Date 1206528849 -3600 > # Node ID 5e0412c5f5798b5c0acdd4057c91b3820d6c4afd > # Parent f5e6cccfdda5537876d6fc2b87ea1124d6043fc8 > Postpone fork after initialization. > > Signed-off-by: Bastian Blank 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