From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:50874) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QR8xl-0000Y5-Pu for qemu-devel@nongnu.org; Mon, 30 May 2011 16:21:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QR8xk-0005j4-FX for qemu-devel@nongnu.org; Mon, 30 May 2011 16:21:21 -0400 Received: from fmmailgate01.web.de ([217.72.192.221]:49632) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QR8xk-0005iy-0X for qemu-devel@nongnu.org; Mon, 30 May 2011 16:21:20 -0400 Received: from smtp06.web.de ( [172.20.5.172]) by fmmailgate01.web.de (Postfix) with ESMTP id A066118FB0D18 for ; Mon, 30 May 2011 22:21:18 +0200 (CEST) Received: from [92.75.140.119] (helo=mchn199C.mchp.siemens.de) by smtp06.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #2) id 1QR8xi-0008F6-00 for qemu-devel@nongnu.org; Mon, 30 May 2011 22:21:18 +0200 Message-ID: <4DE3FC3D.7070409@web.de> Date: Mon, 30 May 2011 22:21:17 +0200 From: Jan Kiszka MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Sender: jan.kiszka@web.de Subject: [Qemu-devel] [PATCH] slirp: Put forked exec into separate process group List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel From: Jan Kiszka Recent smb daemons tend to terminate themselves via a process group SIGTERM. If the daemon is still in qemu's group by that time, qemu will die as well. Avoid this by always pushing fork_exec processes into a group of their own, not just (unused) type 2 execs. Signed-off-by: Jan Kiszka --- slirp/misc.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/slirp/misc.c b/slirp/misc.c index 08eba6a..34179e2 100644 --- a/slirp/misc.c +++ b/slirp/misc.c @@ -153,11 +153,12 @@ fork_exec(struct socket *so, const char *ex, int do_pty) return 0; case 0: + setsid(); + /* Set the DISPLAY */ if (do_pty == 2) { (void) close(master); #ifdef TIOCSCTTY /* XXXXX */ - (void) setsid(); ioctl(s, TIOCSCTTY, (char *)NULL); #endif } else { -- 1.7.1