Merge pidfile fix.
authorJeremy Allison <jra@samba.org>
Fri, 7 Jun 2002 17:49:12 +0000 (17:49 +0000)
committerJeremy Allison <jra@samba.org>
Fri, 7 Jun 2002 17:49:12 +0000 (17:49 +0000)
Jeremy.
(This used to be commit 2c1e78702423ba17993975eb7f158058cc7f229f)

source3/nsswitch/winbindd.c

index 91215e0ef7f417a80a6594125652c30d28fcc41b..398845bdec45bc9976cd0d6e5dd28fbb403e185e 100644 (file)
@@ -834,8 +834,6 @@ static void usage(void)
                exit(1);
        }
 
-       pidfile_create("winbindd");
-
        /* Setup names. */
 
        if (!*global_myname) {
@@ -849,8 +847,10 @@ static void usage(void)
 
         fstrcpy(global_myworkgroup, lp_workgroup());
 
-       if (!interactive)
+       if (!interactive) {
                become_daemon();
+               pidfile_create("winbindd");
+       }
 
 #if HAVE_SETPGID
        /*