WARNING - OLD ARCHIVES

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

xen-changelog

[Xen-changelog] [xen-unstable] [TOOLS][PVFB] Avoid zombie framebuffer ba

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [TOOLS][PVFB] Avoid zombie framebuffer backends.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 03 Dec 2006 15:10:21 +0000
Delivery-date: Sun, 03 Dec 2006 07:10:38 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Steven Smith <ssmith@xxxxxxxxxxxxx>
# Node ID b22274d1311c3f59bc9ddf4cab1a94b368aa8748
# Parent  fb0a586854c1d8a7b814a4b0d77388ee05bb5fe3
[TOOLS][PVFB] Avoid zombie framebuffer backends.

Signed-off-by: Steven Smith <sos22@xxxxxxxxx>
---
 tools/python/xen/xend/server/vfbif.py |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff -r fb0a586854c1 -r b22274d1311c tools/python/xen/xend/server/vfbif.py
--- a/tools/python/xen/xend/server/vfbif.py     Fri Dec 01 12:09:10 2006 +0000
+++ b/tools/python/xen/xend/server/vfbif.py     Fri Dec 01 12:20:12 2006 +0000
@@ -4,6 +4,14 @@ import xen.xend
 import xen.xend
 import os
 
+def spawn_detached(path, args, env):
+    p = os.fork()
+    if p == 0:
+        os.spawnve(os.P_NOWAIT, path, args, env)
+        os._exit(0)
+    else:
+        os.waitpid(p, 0)
+        
 class VfbifController(DevController):
     """Virtual frame buffer controller. Handles all vfb devices for a domain.
     """
@@ -33,7 +41,7 @@ class VfbifController(DevController):
             vnclisten = config.get("vnclisten",
                                    
xen.xend.XendRoot.instance().get_vnclisten_address())
             args += [ "--listen", vnclisten ]
-            os.spawnve(os.P_NOWAIT, args[0], args + std_args, os.environ)
+            spawn_detached(args[0], args + std_args, os.environ)
         elif t == "sdl":
             args = [xen.util.auxbin.pathTo("xen-sdlfb")]
             env = dict(os.environ)
@@ -41,7 +49,7 @@ class VfbifController(DevController):
                 env['DISPLAY'] = config["display"]
             if config.has_key("xauthority"):
                 env['XAUTHORITY'] = config["xauthority"]
-            os.spawnve(os.P_NOWAIT, args[0], args + std_args, env)
+            spawn_detached(args[0], args + std_args, env)
         else:
             raise VmError('Unknown vfb type %s (%s)' % (t, repr(config)))
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [TOOLS][PVFB] Avoid zombie framebuffer backends., Xen patchbot-unstable <=