diff options
author | Gerald Carter <jerry@samba.org> | 2003-01-03 17:39:30 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2003-01-03 17:39:30 +0000 |
commit | f5d5df9644abc08ae1b16a0826eb8cf5c3de54d1 (patch) | |
tree | 1a8219ffe84022f095ea553da990226c9de49514 /source3/lib | |
parent | 6985578f5b7b83fc4896ae7316ce1a244e8f9a2d (diff) | |
download | samba-f5d5df9644abc08ae1b16a0826eb8cf5c3de54d1.tar.gz samba-f5d5df9644abc08ae1b16a0826eb8cf5c3de54d1.tar.bz2 samba-f5d5df9644abc08ae1b16a0826eb8cf5c3de54d1.zip |
patch to include support for daemontools from Michael Handler
(This used to be commit a8db1b611d83bfd8dcf60f1e6d8fcbf57c798528)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/debug.c | 1 | ||||
-rw-r--r-- | source3/lib/util.c | 9 |
2 files changed, 7 insertions, 3 deletions
diff --git a/source3/lib/debug.c b/source3/lib/debug.c index ea5bad3b6d..966a53fca3 100644 --- a/source3/lib/debug.c +++ b/source3/lib/debug.c @@ -525,6 +525,7 @@ void setup_logging(const char *pname, BOOL interactive) if (interactive) { stdout_logging = True; dbf = x_stdout; + x_setbuf( x_stdout, NULL ); } #ifdef WITH_SYSLOG else { 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 |