From: Randy Thelen Subject: Xend patch to support debugging of xend Date: Thu, 27 Apr 2006 11:22:45 -0700 Message-ID: <4F352F8E-BAAD-4763-A569-53E1CEC5F187@netapp.com> Mime-Version: 1.0 (Apple Message framework v749.3) Content-Type: multipart/mixed; boundary=Apple-Mail-4-351241167 Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel List-Id: xen-devel@lists.xenproject.org --Apple-Mail-4-351241167 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed 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 --Apple-Mail-4-351241167 Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-unix-mode=0644; name="xend-SrvDaemon-pdb.patch" Content-Disposition: attachment; filename=xend-SrvDaemon-pdb.patch diff -r 6d255ac3786c tools/python/xen/xend/server/SrvDaemon.py --- a/tools/python/xen/xend/server/SrvDaemon.py Wed Mar 15 12:53:53 2006 +0100 +++ b/tools/python/xen/xend/server/SrvDaemon.py Thu Apr 27 11:20:45 2006 -0700 @@ -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 --Apple-Mail-4-351241167 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed --Apple-Mail-4-351241167 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Apple-Mail-4-351241167--