diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-03-21 13:16:50 +0000 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2006-03-21 13:16:50 +0000 |
commit | c59d3c793cb403b863740452f646209941f5f1ea (patch) | |
tree | 8ba267016811fe3d27b0115ca1b5c041353f25d6 /source/nsswitch/winbindd.c | |
parent | 818d0b169e307c83ea16de42a6ad6e6a42861b73 (diff) | |
download | samba-c59d3c793cb403b863740452f646209941f5f1ea.tar.gz samba-c59d3c793cb403b863740452f646209941f5f1ea.tar.xz samba-c59d3c793cb403b863740452f646209941f5f1ea.zip |
r14618: add --no-process-group to all server programms
to make the following possible:
timelimit 20000 bin/nmbd -F -S --no-process-group
timelimit 20000 bin/smbd -F -S --no-process-group
this is needed to 'make test' working without losing child processes
metze
Diffstat (limited to 'source/nsswitch/winbindd.c')
-rw-r--r-- | source/nsswitch/winbindd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/nsswitch/winbindd.c b/source/nsswitch/winbindd.c index dc62a8563a8..72dd39373b8 100644 --- a/source/nsswitch/winbindd.c +++ b/source/nsswitch/winbindd.c @@ -912,10 +912,12 @@ int main(int argc, char **argv) pstring logfile; static BOOL Fork = True; static BOOL log_stdout = False; + static BOOL no_process_group = False; struct poptOption long_options[] = { POPT_AUTOHELP { "stdout", 'S', POPT_ARG_VAL, &log_stdout, True, "Log to stdout" }, { "foreground", 'F', POPT_ARG_VAL, &Fork, False, "Daemon in foreground mode" }, + { "no-process-group", 0, POPT_ARG_VAL, &no_process_group, True, "Don't create a new process group" }, { "interactive", 'i', POPT_ARG_NONE, NULL, 'i', "Interactive mode" }, { "no-caching", 'n', POPT_ARG_VAL, &opt_nocache, True, "Disable caching" }, POPT_COMMON_SAMBA @@ -1036,7 +1038,7 @@ int main(int argc, char **argv) CatchSignal(SIGHUP, sighup_handler); if (!interactive) - become_daemon(Fork); + become_daemon(Fork, no_process_group); pidfile_create("winbindd"); @@ -1045,7 +1047,7 @@ int main(int argc, char **argv) * If we're interactive we want to set our own process group for * signal management. */ - if (interactive) + if (interactive && !no_process_group) setpgid( (pid_t)0, (pid_t)0); #endif |