aboutsummaryrefslogtreecommitdiff
path: root/gdb/ser-unix.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-07-29 19:02:08 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-07-29 19:02:08 +0000
commitd4c22c52330c6dd6ba3a1f723a19786a16102c83 (patch)
tree9a1b8c9e68c6aec7c134da7ce22da1aa60341231 /gdb/ser-unix.c
parent4432b9f9ff3f14ddef531b46396206484098678c (diff)
downloadfsf-binutils-gdb-d4c22c52330c6dd6ba3a1f723a19786a16102c83.zip
fsf-binutils-gdb-d4c22c52330c6dd6ba3a1f723a19786a16102c83.tar.gz
fsf-binutils-gdb-d4c22c52330c6dd6ba3a1f723a19786a16102c83.tar.bz2
* ser-unix.c (gdb_setpgid): Pass our pid, not 0, to setpgid.
Diffstat (limited to 'gdb/ser-unix.c')
-rw-r--r--gdb/ser-unix.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/ser-unix.c b/gdb/ser-unix.c
index 1f8d738..9b67230 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)