bitkeeper revision 1.1159.223.76 (4207b472nHz4nbC_OJgbSmfRVow8XQ)
authoriap10@freefall.cl.cam.ac.uk <iap10@freefall.cl.cam.ac.uk>
Mon, 7 Feb 2005 18:33:22 +0000 (18:33 +0000)
committeriap10@freefall.cl.cam.ac.uk <iap10@freefall.cl.cam.ac.uk>
Mon, 7 Feb 2005 18:33:22 +0000 (18:33 +0000)
Don't let xend throw away stderr...

tools/python/xen/xend/server/SrvDaemon.py

index 338d6e4d4a61369903e4fc3029079c658311e1f0..d54dec26bb007246b74d41b1e3fcb306755c891c 100644 (file)
@@ -484,10 +484,12 @@ class Daemon:
             # XXX KAF: Why doesn't this capture output from C extensions that
             # fprintf(stdout) or fprintf(stderr) ??
             os.open('/var/log/xend-debug.log', os.O_WRONLY|os.O_CREAT)
+            os.dup(1)
         else:
             os.open('/dev/null', os.O_RDWR)
             os.dup(0)
-        os.dup(1)
+            os.open('/var/log/xend-debug.log', os.O_WRONLY|os.O_CREAT)
+
         
     def start(self, trace=0):
         """Attempts to start the daemons.