[gnu.emacs.bug] setpgrp

weening@Gang-of-Four.Stanford.EDU (Joe Weening) (02/27/89)

The call to setpgrp() that was added to src/emacs.c in 18.53 causes
Emacs to die when run as a child of "sh" (either from an interactive
shell or a script such as Pnews).  This happens on an Alliant, an IBM
PC/RT, and perhaps other systems.

Here is the change that causes the problem.

diff -rc2N dist-18.52/src/emacs.c dist-18.53/src/emacs.c
*** dist-18.52/src/emacs.c	Fri Aug 26 18:31:50 1988
--- dist-18.53/src/emacs.c	Sat Feb 18 09:03:50 1989
***************
*** 225,228 ****
--- 225,233 ----
  #endif HIGHPRI
  
+ #ifdef BSD
+   /* interrupt_input has trouble if we aren't in a separate process group.  */
+   setpgrp (getpid (), getpid ());
+ #endif
+ 
    inhibit_window_system = 0;
  
--

Joe Weening                                Computer Science Dept.
weening@Gang-of-Four.Stanford.EDU          Stanford University

lnz@LUCID.COM (Leonard N. Zubkoff) (02/27/89)

Interesting, I had to get rid of that setpgrp in order for Emacs to run
correctly in any non-csh shell on my Apollo running Domain/OS SR10.1.
(I ran into this trying to run Emacs in an Aegis shell, however).