diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2011-07-20 12:20:17 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-07-23 10:19:49 -0500 |
commit | af35375b6d600cf553f0d0748b2a10ff7dbf6142 (patch) | |
tree | 1f9e7f5d2d6db1788c628d7f7bfd8f8b068ccd60 | |
parent | b0f74a483d5ca50dda42959133a34f1ca72deaa3 (diff) | |
download | slirp-af35375b6d600cf553f0d0748b2a10ff7dbf6142.zip slirp-af35375b6d600cf553f0d0748b2a10ff7dbf6142.tar.gz slirp-af35375b6d600cf553f0d0748b2a10ff7dbf6142.tar.bz2 |
slirp: Put forked exec into separate process group
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 <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r-- | misc.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -146,11 +146,12 @@ int 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 { |