All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Katz <katzj@redhat.com>
To: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: [PATCH] Fix closing of /var/log/xend.log fd
Date: Thu, 01 Sep 2005 00:03:13 -0400	[thread overview]
Message-ID: <1125547393.2569.90.camel@bree.local.net> (raw)

[-- 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

             reply	other threads:[~2005-09-01  4:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-01  4:03 Jeremy Katz [this message]
2005-09-01 10:26 ` [PATCH] Fix closing of /var/log/xend.log fd Christian Limpach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1125547393.2569.90.camel@bree.local.net \
    --to=katzj@redhat.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.