Turns out that setpgrp(0,0) is different from setpgrp(pid,pid) -- and
authorChris Hanson <org/chris-hanson/cph>
Mon, 22 Nov 1993 22:34:39 +0000 (22:34 +0000)
committerChris Hanson <org/chris-hanson/cph>
Mon, 22 Nov 1993 22:34:39 +0000 (22:34 +0000)
only the former works correctly on some BSD systems.

v7/src/microcode/ux.c

index 32f6e04553f2640461e6945b302343f3a6e0f7fe..1c88ee4155a0104fe79769e7ddb5839c52d69734 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: ux.c,v 1.12 1993/10/27 22:16:43 gjr Exp $
+$Id: ux.c,v 1.13 1993/11/22 22:34:39 cph Exp $
 
 Copyright (c) 1990-1993 Massachusetts Institute of Technology
 
@@ -171,10 +171,7 @@ DEFUN_VOID (UX_setsid)
       UX_close (fd);
     }
 #endif
-  {
-    pid_t pid = (getpid ());
-    return (setpgrp (pid, pid));
-  }
+  return (setpgrp (0, 0));
 }
 
 #ifndef _SUNOS