[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] libxl: Call setsid(2) before exec'ing device model

# HG changeset patch
# User Jim Fehlig <jfehlig@xxxxxxxxxx>
# Date 1299781036 0
# Node ID a46101334ee21410a05434f9093138c914ba7a3d
# Parent  b16644e446eff0c8c590df32462eac02e3cbcffe
libxl: Call setsid(2) before exec'ing device model

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@xxxxxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Acked-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>

diff -r b16644e446ef -r a46101334ee2 tools/libxl/libxl_dm.c
--- a/tools/libxl/libxl_dm.c    Thu Mar 10 18:11:31 2011 +0000
+++ b/tools/libxl/libxl_dm.c    Thu Mar 10 18:17:16 2011 +0000
@@ -694,6 +694,7 @@
     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, 

Xen-changelog mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.