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-4.1-testing] libxl: Call setsid(2) before exec'ing

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-4.1-testing] libxl: Call setsid(2) before exec'ing device model
From: Xen patchbot-4.1-testing <patchbot@xxxxxxx>
Date: Sat, 12 Mar 2011 07:35:11 +0000
Delivery-date: Fri, 11 Mar 2011 23:35:16 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Jim Fehlig <jfehlig@xxxxxxxxxx>
# Date 1299781075 0
# Node ID 578976db4613572d6341c702a4c6929eb65cb85e
# Parent  943a1d993dcd03824b4ff024ca3b2bc475950d39
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 943a1d993dcd -r 578976db4613 tools/libxl/libxl_dm.c
--- a/tools/libxl/libxl_dm.c    Thu Mar 10 18:11:20 2011 +0000
+++ b/tools/libxl/libxl_dm.c    Thu Mar 10 18:17:55 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, 
libxl_libexec_path()),
                    args);

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-4.1-testing] libxl: Call setsid(2) before exec'ing device model, Xen patchbot-4 . 1-testing <=