ia64/xen-unstable

changeset 6588:f25a9797419e

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@redhat.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Thu Sep 01 10:26:17 2005 +0000 (2005-09-01)
parents d387866584e2
children 6bb68b092976
files tools/python/xen/xend/server/SrvServer.py
line diff
     1.1 --- a/tools/python/xen/xend/server/SrvServer.py	Thu Sep 01 10:16:40 2005 +0000
     1.2 +++ b/tools/python/xen/xend/server/SrvServer.py	Thu Sep 01 10:26:17 2005 +0000
     1.3 @@ -61,9 +61,14 @@ class XendServers:
     1.4  
     1.5      def start(self):
     1.6          Vifctl.network('start')
     1.7 +        threads = []
     1.8          for server in self.servers:
     1.9              thread = Thread(target=server.run)
    1.10              thread.start()
    1.11 +            threads.append(thread)
    1.12 +
    1.13 +        for t in threads:
    1.14 +            t.join()
    1.15  
    1.16  def create():
    1.17      root = SrvDir()