* ser-unix.c (gdb_setpgid): Pass our pid, not 0, to setpgid.
[deliverable/binutils-gdb.git] / gdb / ser-unix.c
index 1f8d738f70ab425f6ce3283ad67489b1fdfd721c..9b67230a07ab8f80bb235ed5248244c8e0910db6 100644 (file)
@@ -680,7 +680,10 @@ gdb_setpgid ()
     {
 #if defined (NEED_POSIX_SETPGID) || defined (HAVE_TERMIOS)
       /* Do all systems with termios have setpgid?  I hope so.  */
-      retval = setpgid (0, 0);
+      /* setpgid (0, 0) is supposed to work and mean the same thing as
+        this, but on Ultrix 4.2A it fails with EPERM (and
+        setpgid (getpid (), getpid ()) succeeds).  */
+      retval = setpgid (getpid (), getpid ());
 #else
 #if defined (TIOCGPGRP)
 #if defined(USG) && !defined(SETPGRP_ARGS)
This page took 0.022687 seconds and 4 git commands to generate.