always create a new process group

pppd sends signals to the whole process group, so it must always create
a new one or it may kill the parent process and its siblings.
Currently setsid() is not called when the updetach option is used.
We want to make the detached and non-detached code paths as similar as
possible.

http://ppp.samba.org/cgi-bin/ppp-bugs/incoming?id=1411
http://ppp.samba.org/cgi-bin/ppp-bugs/incoming?id=1589

--- a/pppd/main.c
+++ b/pppd/main.c
@@ -431,6 +431,13 @@ main(argc, argv)
     }
 
     /*
+     * pppd sends signals to the whole process group, so it must always
+     * create a new one or it may kill the parent process and its siblings.
+     */
+    setsid();
+    chdir("/");
+
+    /*
      * Initialize system-dependent stuff.
      */
     sys_init();
@@ -774,8 +781,6 @@ detach()
 	    create_linkpidfile(pid);
 	exit(0);		/* parent dies */
     }
-    setsid();
-    chdir("/");
     dup2(fd_devnull, 0);
     dup2(fd_devnull, 1);
     dup2(fd_devnull, 2);
