syscall_proc: use setsid() to implement setpgrp() on level 2
authorAlan Cox <alan@linux.intel.com>
Tue, 29 Dec 2015 19:16:47 +0000 (19:16 +0000)
committerAlan Cox <alan@linux.intel.com>
Tue, 29 Dec 2015 19:16:47 +0000 (19:16 +0000)
Kernel/syscall_proc.c

index e56081e..e46220f 100644 (file)
@@ -569,9 +569,16 @@ setpgrp (void)                    Function 53
 
 arg_t _setpgrp(void)
 {
+#ifdef CONFIG_LEVEL_2
+       /* For full session management it's a shade
+          more complicated and we have the routine
+          to do the full job */
+       return setsid(0,0);
+#else
        udata.u_ptab->p_pgrp = udata.u_ptab->p_pid;
        udata.u_ptab->p_tty = 0;
-       return (0);
+       return 0;
+#endif 
 }
 
 /********************************************