diff options
author | Mark Kettenis <kettenis@gnu.org> | 2001-07-23 19:21:57 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2001-07-23 19:21:57 +0000 |
commit | ab4cc7750160b43383c8c3a84fadb9946a0f6663 (patch) | |
tree | e70edf9c87117ca8e87db159de519c8e3d3f4d1f /gdb/inflow.c | |
parent | 881d62a2786c080cdc639f4ce6dbc36d40daf732 (diff) | |
download | gdb-ab4cc7750160b43383c8c3a84fadb9946a0f6663.tar.gz |
* configure.in (AC_CHECK_FUNCS): Add setpggrp.
(AC_FUNC_SETPGRP): Add.
* aclocal.m4, configure, config.in: Regenerated.
* inflow.c (gdb_setpgid): Get rid of NEED_POSIX_SETPGID and
SETPGRP_ARGS. Always use setpgid if it is available, fall back on
setpgrp if it isn't. Use SETPGRP_VOID (defined by autoconf) to
distinguish between the two setpgrp flavours.
* config/xm-sysv4.h, config/arm/xm-linux.h,
config/i386/xm-i386aix.h, config/i386/xm-sco.h,
config/i386/xm-linux.h, config/i386/xm-ptx.h,
config/m68k/xm-linux.h, config/powerpc/xm-linux.h,
config/sparc/xm-linux.h, config/sparc/xm-sun4sol2.h,
config/ia64/xm-linux.h (NEED_POSIX_SETPGID): Remove.
* config/rs6000/xm-rs6000.h (SETPGRP_ARGS): Remove.
Diffstat (limited to 'gdb/inflow.c')
-rw-r--r-- | gdb/inflow.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/gdb/inflow.c b/gdb/inflow.c index 801bb92b7b1..66671f7a681 100644 --- a/gdb/inflow.c +++ b/gdb/inflow.c @@ -709,21 +709,24 @@ gdb_setpgid (void) if (job_control) { -#if defined (NEED_POSIX_SETPGID) || (defined (HAVE_TERMIOS) && defined (HAVE_SETPGID)) - /* setpgid (0, 0) is supposed to work and mean the same thing as - this, but on Ultrix 4.2A it fails with EPERM (and +#if defined (HAVE_TERMIOS) || defined (TIOCGPGRP) +#ifdef HAVE_SETPGID + /* The call 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) +#ifdef HAVE_SETPGRP +#ifdef SETPGRP_VOID retval = setpgrp (); #else retval = setpgrp (getpid (), getpid ()); -#endif /* USG */ -#endif /* TIOCGPGRP. */ -#endif /* NEED_POSIX_SETPGID */ +#endif +#endif /* HAVE_SETPGRP */ +#endif /* HAVE_SETPGID */ +#endif /* defined (HAVE_TERMIOS) || defined (TIOCGPGRP) */ } + return retval; } |