All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix closing of /var/log/xend.log fd
@ 2005-09-01  4:03 Jeremy Katz
  2005-09-01 10:26 ` Christian Limpach
  0 siblings, 1 reply; 2+ messages in thread
From: Jeremy Katz @ 2005-09-01  4:03 UTC (permalink / raw)
  To: xen-devel@lists.xensource.com

[-- Attachment #1: Type: text/plain, Size: 520 bytes --]

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 <katzj@redhat.com>

Jeremy

[-- Attachment #2: xen-log.patch --]
[-- Type: text/x-patch, Size: 545 bytes --]

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()

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-09-01 10:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-01  4:03 [PATCH] Fix closing of /var/log/xend.log fd Jeremy Katz
2005-09-01 10:26 ` Christian Limpach

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.