diff options
author | Andreas Schneider <asn@samba.org> | 2017-11-10 09:18:18 +0100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2017-11-28 11:37:06 +0100 |
commit | 8736013dc42c5755b75bbb2e843a290bcd545909 (patch) | |
tree | 9ae0fd62144e94907265f2e070893c3d56bdc3a8 /source3/smbd/server.c | |
parent | bfafabfb942668328401a3c89fc55b50dc56c209 (diff) | |
download | samba-8736013dc42c5755b75bbb2e843a290bcd545909.tar.gz |
s4:samba: Allow samba daemon to run in foreground
We are passing the no_process_group to become_daemon() that setsid() is
not called. In case we are double forking, we run in SysV daemon mode,
setsid() should be called!
See:
https://www.freedesktop.org/software/systemd/man/daemon.html
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13129
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3/smbd/server.c')
-rw-r--r-- | source3/smbd/server.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 916727635f9..5b421ff4bb3 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -1593,7 +1593,7 @@ extern void build_options(bool screen); struct poptOption long_options[] = { POPT_AUTOHELP {"daemon", 'D', POPT_ARG_NONE, NULL, OPT_DAEMON, "Become a daemon (default)" }, - {"interactive", 'i', POPT_ARG_NONE, NULL, OPT_INTERACTIVE, "Run interactive (not a daemon)"}, + {"interactive", 'i', POPT_ARG_NONE, NULL, OPT_INTERACTIVE, "Run interactive (not a daemon) and log to stdout"}, {"foreground", 'F', POPT_ARG_NONE, NULL, OPT_FORK, "Run daemon in foreground (for daemontools, etc.)" }, {"no-process-group", '\0', POPT_ARG_NONE, NULL, OPT_NO_PROCESS_GROUP, "Don't create a new process group" }, {"log-stdout", 'S', POPT_ARG_NONE, NULL, OPT_LOG_STDOUT, "Log to stdout" }, |