Skip to contentSkip to conversation

Xend patch to support debugging of xend

PATCH Randy Thelen 1 participant 1 message Apr 27, 2006

lore
Share & tools
lore
#0 lore raw

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.

tools/python/xen/xend/server/SrvDaemon.py +7 -0
diff -r 6d255ac3786c tools/python/xen/xend/server/SrvDaemon.py
@@ -133,6 +133,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-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel