Mercurial > emacs
changeset 3434:e7558407ad29
(shut_down_emacs): Handle GETPGRP_NO_ARG.
(main) [BSD]: Delete the setpgrp (both times).
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 02 Jun 1993 19:11:58 +0000 |
parents | 2f5a9b79edf7 |
children | 7930bf123cb7 |
files | src/emacs.c |
diffstat | 1 files changed, 13 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/emacs.c Wed Jun 02 19:10:31 1993 +0000 +++ b/src/emacs.c Wed Jun 02 19:11:58 1993 +0000 @@ -292,8 +292,16 @@ #endif clearerr (stdin); +#if 0 /* Without EMACS_SET_TTY_PGRP, this causes Emacs to hang + when run under a non-job-control shell. + EMACS_SET_TTY_PGRP seems correct, but breaks even more. */ #ifdef BSD - setpgrp (0, getpid ()); + { + int pid = getpid (); + setpgrp (0, pid); + EMACS_SET_TTY_PGRP (0, &pid); + } +#endif #endif #ifdef APOLLO @@ -323,11 +331,6 @@ setuid (getuid ()); #endif /* PRIO_PROCESS */ -#ifdef BSD - /* interrupt_input has trouble if we aren't in a separate process group. */ - setpgrp (getpid (), getpid ()); -#endif - inhibit_window_system = 0; /* Handle the -t switch, which specifies filename to use as terminal */ @@ -677,7 +680,11 @@ { int tpgrp; if (EMACS_GET_TTY_PGRP (0, &tpgrp) != -1 +#ifdef GETPGRP_NO_ARG + && tpgrp == getpgrp ()) +#else && tpgrp == getpgrp (0)) +#endif { fflush (stdout); reset_sys_modes ();