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 | 0200359f12b09d83e4fecfddd1e7a5174ca17e60 (patch) | |
tree | 682eae85004590be68a5b3e24eb63d1eb3532e6b /gdb/inflow.c | |
parent | 413eca6f968c5c6321e273b60b453423cf532d9e (diff) | |
download | gdb-0200359f12b09d83e4fecfddd1e7a5174ca17e60.zip gdb-0200359f12b09d83e4fecfddd1e7a5174ca17e60.tar.gz gdb-0200359f12b09d83e4fecfddd1e7a5174ca17e60.tar.bz2 |
* 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 801bb92..66671f7 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; } |