From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Katz Subject: [PATCH] Fix closing of /var/log/xend.log fd Date: Thu, 01 Sep 2005 00:03:13 -0400 Message-ID: <1125547393.2569.90.camel@bree.local.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-qnBemUpWIrXGO8B2Uid4" 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@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org --=-qnBemUpWIrXGO8B2Uid4 Content-Type: text/plain Content-Transfer-Encoding: 7bit The attached patch fixes the problem where /var/log/xend.log was getting closed and then /var/log/xend-debug was getting all the spam about the fd being closed in the logging stuff. Basically what was happening is that the main thread wasn't sticking around and during its exit, the atexit handlers of the python logging stuff got called closing the log fd. Patch makes it so that we instead wait on the real server threads to exit before shutting things down. Signed-off-by: Jeremy Katz Jeremy --=-qnBemUpWIrXGO8B2Uid4 Content-Disposition: attachment; filename=xen-log.patch Content-Type: text/x-patch; name=xen-log.patch; charset=UTF-8 Content-Transfer-Encoding: 7bit diff -r 8af8ddf91078 tools/python/xen/xend/server/SrvServer.py --- a/tools/python/xen/xend/server/SrvServer.py Wed Aug 31 14:53:43 2005 +++ b/tools/python/xen/xend/server/SrvServer.py Thu Sep 1 00:01:48 2005 @@ -61,9 +61,14 @@ def start(self): Vifctl.network('start') + threads = [] for server in self.servers: thread = Thread(target=server.run) thread.start() + threads.append(thread) + + for t in threads: + t.join() def create(): root = SrvDir() --=-qnBemUpWIrXGO8B2Uid4 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 --=-qnBemUpWIrXGO8B2Uid4--