summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/nsswitch/winbindd.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c
index a937f06639..bb4a1b78ec 100644
--- a/source3/nsswitch/winbindd.c
+++ b/source3/nsswitch/winbindd.c
@@ -853,8 +853,11 @@ static void usage(void)
fstrcpy(global_myworkgroup, lp_workgroup());
- if (!interactive)
+ if (!interactive) {
become_daemon();
+ pidfile_create("winbindd");
+ }
+
#if HAVE_SETPGID
/*
@@ -889,10 +892,6 @@ static void usage(void)
return 1;
}
- /* Only create the pidfile when we're ready to receive requests. */
- if (!interactive)
- pidfile_create("winbindd");
-
/* Loop waiting for requests */
process_loop(accept_sock);