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-changelog

[Xen-changelog] Debugging Xend with XEND_DAEMONIZE set to False doesn't

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Debugging Xend with XEND_DAEMONIZE set to False doesn't work as
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 30 Apr 2006 11:12:11 +0000
Delivery-date: Sun, 30 Apr 2006 04:29:56 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID a19cc748469e99eae7f289f3beb03206982b9ba2
# Parent  63e29ff50fe6f68aed9d36911621b442fae4ebd5
Debugging Xend with XEND_DAEMONIZE set to False doesn't work as  
expected.  Xend actually creates two children and the XEND_DAEMONIZE  
flag only prevents one of the children from being created.  This  
patch causes none of the children to be created.  With this patch,  
Xend functionality is performed in the process executed from the  
command line (i.e., /usr/sbin/xend).  This patch makes it possible to  
debug Xend with pdb.

Signed-off-by: Randy Thelen <rthelen@xxxxxxxxxx>

diff -r 63e29ff50fe6 -r a19cc748469e tools/python/xen/xend/server/SrvDaemon.py
--- a/tools/python/xen/xend/server/SrvDaemon.py Sun Apr 30 09:52:13 2006 +0100
+++ b/tools/python/xen/xend/server/SrvDaemon.py Sun Apr 30 09:52:59 2006 +0100
@@ -87,8 +87,6 @@ class Daemon:
 
 
     def daemonize(self):
-        if not XEND_DAEMONIZE: return
- 
         # Detach from TTY.
 
         # Become the group leader (already a child process)
@@ -133,6 +131,13 @@ class Daemon:
 
         ret = 0
 
+        # If we're not going to create a daemon, simply
+        # call the run method right here.
+        if not XEND_DAEMONIZE:
+            self.tracing(trace)
+            self.run(None)
+            return ret;
+        
         # we use a pipe to communicate between the parent and the child process
         # this way we know when the child has actually initialized itself so
         # we can avoid a race condition during startup

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Debugging Xend with XEND_DAEMONIZE set to False doesn't work as, Xen patchbot -unstable <=