From df4af79c784fa3dbc14c8ca2eefc51c78a22e26b Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 3 Jan 2003 17:32:11 +0000 Subject: patch to include support for daemontools from Michael Handler (This used to be commit 4c48c475a28450ad4fd8dcc8263e841c0c39a80e) --- source3/lib/util.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'source3/lib/util.c') diff --git a/source3/lib/util.c b/source3/lib/util.c index 67de9e4bf2..ec967e4abf 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -873,10 +873,13 @@ void msleep(unsigned int t) Become a daemon, discarding the controlling terminal. ****************************************************************************/ -void become_daemon(void) +void become_daemon(BOOL Fork) { - if (sys_fork()) - _exit(0); + if (Fork) { + if (sys_fork()) { + _exit(0); + } + } /* detach from the terminal */ #ifdef HAVE_SETSID -- cgit