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/
Home Products Support Community News


[Xen-changelog] Fix closing of /var/log/xend.log fd

# HG changeset patch
# User cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID f25a9797419e5a40e482a9121042e05883b80751
# Parent  d387866584e2d11129d2a0d41deaf5732e44c7f6
Fix closing of /var/log/xend.log fd
Fix 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@xxxxxxxxxx>
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>

diff -r d387866584e2 -r f25a9797419e tools/python/xen/xend/server/SrvServer.py
--- a/tools/python/xen/xend/server/SrvServer.py Thu Sep  1 10:16:40 2005
+++ b/tools/python/xen/xend/server/SrvServer.py Thu Sep  1 10:26:17 2005
@@ -61,9 +61,14 @@
     def start(self):
+        threads = []
         for server in self.servers:
             thread = Thread(target=server.run)
+            threads.append(thread)
+        for t in threads:
+            t.join()
 def create():
     root = SrvDir()

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix closing of /var/log/xend.log fd, Xen patchbot -unstable <=