From d4c22c52330c6dd6ba3a1f723a19786a16102c83 Mon Sep 17 00:00:00 2001 From: Jim Kingdon Date: Thu, 29 Jul 1993 19:02:08 +0000 Subject: [PATCH] * ser-unix.c (gdb_setpgid): Pass our pid, not 0, to setpgid. --- gdb/ChangeLog | 2 ++ gdb/ser-unix.c | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 23bcf59c5f..01e10e9741 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,7 @@ Thu Jul 29 12:09:46 1993 Jim Kingdon (kingdon@lioth.cygnus.com) + * ser-unix.c (gdb_setpgid): Pass our pid, not 0, to setpgid. + * remote-monitor.c (_initialize_monitor): Comment out use of connect_command, since connect_command itself is commented out. diff --git a/gdb/ser-unix.c b/gdb/ser-unix.c index 1f8d738f70..9b67230a07 100644 --- a/gdb/ser-unix.c +++ b/gdb/ser-unix.c @@ -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) -- 2.34.1