Jim Fehlig
2011-Mar-08 02:55 UTC
[Xen-devel] [PATCH] libxl: Call setsid(2) before exec''ing device model
While developing libvirt libxl driver I noticed that terminating the client causes any qemu-dm processes indirectly started by the client to also terminate. Calling setsid(2) before exec''ing qemu-dm resolves the issue but I''m not quite sure about the placement of the setsid() call or any unforeseen side-affects of its use. Comments welcome. Regards, Jim _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2011-Mar-10 18:19 UTC
Re: [Xen-devel] [PATCH] libxl: Call setsid(2) before exec''ing device model
Jim Fehlig writes ("[Xen-devel] [PATCH] libxl: Call setsid(2) before exec''ing device model"):> While developing libvirt libxl driver I noticed that terminating the > client causes any qemu-dm processes indirectly started by the client to > also terminate. Calling setsid(2) before exec''ing qemu-dm resolves the > issue but I''m not quite sure about the placement of the setsid() call or > any unforeseen side-affects of its use. Comments welcome.Thanks, I think your patch is correct, and has the setsid in the right place. libxl_spawn_spawn was another possibility but I think it''s probably better to do it in the caller. Applied (with my and Stefano''s ack) to 4.1 and unstable. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel