* [Qemu-devel] [PATCH] slirp: Put forked exec into separate process group
@ 2011-05-30 20:21 Jan Kiszka
0 siblings, 0 replies; only message in thread
From: Jan Kiszka @ 2011-05-30 20:21 UTC (permalink / raw)
To: qemu-devel
From: Jan Kiszka <jan.kiszka@siemens.com>
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>
---
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-05-30 20:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-30 20:21 [Qemu-devel] [PATCH] slirp: Put forked exec into separate process group Jan Kiszka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).