1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-14 20:23:54 +03:00

patch to include support for daemontools from Michael Handler

This commit is contained in:
Gerald Carter
-
parent 1564ebfc99
commit a8db1b611d
20 changed files with 553 additions and 155 deletions

View File

@@ -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