summaryrefslogtreecommitdiff
path: root/source3/nmbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-12-30 01:46:38 +0000
committerJeremy Allison <jra@samba.org>2001-12-30 01:46:38 +0000
commitbb81e23e176ec7dfe0111b5aa2946a51239ef3b9 (patch)
treec1df8492aba552c718d407988ab146e37dc4b3e6 /source3/nmbd
parent98010a076797f4d05d8c9bff45e65c076f30da3a (diff)
downloadsamba-bb81e23e176ec7dfe0111b5aa2946a51239ef3b9.tar.gz
samba-bb81e23e176ec7dfe0111b5aa2946a51239ef3b9.tar.bz2
samba-bb81e23e176ec7dfe0111b5aa2946a51239ef3b9.zip
When running interactive we want to set our own process group for
signal management. Jeremy. (This used to be commit fffae94dd5699f44c0b1c8081587deafd89b3fc0)
Diffstat (limited to 'source3/nmbd')
-rw-r--r--source3/nmbd/nmbd.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c
index 29b6c0347a..b2ff81675a 100644
--- a/source3/nmbd/nmbd.c
+++ b/source3/nmbd/nmbd.c
@@ -803,6 +803,15 @@ static void usage(char *pname)
become_daemon();
}
+#if HAVE_SETPGID
+ /*
+ * If we're interactive we want to set our own process group for
+ * signal management.
+ */
+ if (opt_interactive)
+ setpgid( (pid_t)0, (pid_t)0 );
+#endif
+
#ifndef SYNC_DNS
/* Setup the async dns. We do it here so it doesn't have all the other
stuff initialised and thus chewing memory and sockets */