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

[Xen-devel] [PATCH] better daemon-ization of xend

To: <xen-devel@xxxxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] better daemon-ization of xend
From: "Charles Coffing" <ccoffing@xxxxxxxxxx>
Date: Fri, 17 Sep 2004 14:45:11 -0600
Delivery-date: Fri, 17 Sep 2004 21:47:03 +0100
Envelope-to: steven.hand@xxxxxxxxxxxx
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
The attached patch tidies up how xend becomes a daemon, and it hooks up
the "restart" and "status" commands.


Details:

I attempted to start xend from SuSE's YaST, but YaST hung waiting on
xend to start.  Turns out that xend wasn't quite becoming a daemon. 
setsid was conditionally called for xend, and never called for xfrd. 
Stdin, stdout, and stderr were left open and this is what hung YaST.

Daemon.(start|status) now return LSB-defined error codes.  I realize the
python scripts are probably meant to be cross platform, but it seemed
cleaner to inheirit a few LSB error codes here, rather than create my
own and then try to remap them up in /etc/init.d/xend.

I still suspect Linux distributions will write their own
/etc/init.d/xend scripts, but at least now the stock one behaves a
little better.

Attachment: xend.diff
Description: Binary data

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] better daemon-ization of xend, Charles Coffing <=