]> xenbits.xensource.com Git - people/vhanquez/xen.git/commitdiff
libxl: Call setsid(2) before exec'ing device model
authorJim Fehlig <jfehlig@novell.com>
Thu, 10 Mar 2011 18:17:55 +0000 (18:17 +0000)
committerJim Fehlig <jfehlig@novell.com>
Thu, 10 Mar 2011 18:17:55 +0000 (18:17 +0000)
While doing development on libvirt libxenlight driver I noticed
that terminating a libxenlight client causes any qemu-dm
processes that were indirectly created by the client to also
terminate.  Calling setsid(2) before exec'ing qemu-dm resolves
the issue.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/libxl_dm.c

index bc0bae7a96676fe80d4520671e45badac5493878..d535e11a76dd120a66a971a243908ecfa3975188 100644 (file)
@@ -694,6 +694,7 @@ retry_transaction:
     if (rc < 0)
         goto out_close;
     if (!rc) { /* inner child */
+        setsid();
         libxl__exec(null, logfile_w, logfile_w,
                    libxl__abs_path(&gc, info->device_model, libxl_libexec_path()),
                    args);