[comp.emacs] setpgrp bug in 18.54 for USG?

wjc@ho5cad.ATT.COM (Bill Carpenter) (05/01/89)

Using GNU Emacs 18.54.1 of Sun Apr 30 1989 on ho5cad (usg-unix-v)

After bringing our 18.53 to 18.54 by patching in the diffs, we notice
the following behavior: hitting C-G kills subprocesses.  (We have
observed this with loadst as well as the emacs server.)

Am I right in speculating that this part of the 18.54 changes is
possibly to blame?  (Right at the moment, I don't have time to fiddle
with this.)

================================================================
+   * process.c (create_process):
+   On all USG systems, not just IRIS and AIX, don't pre-open pty's tty.
+   Move the setpgrp done for USG (no real change).
+   * callproc.c (child_setup): Don't do setpgrp on USG.
================================================================
[callproc.c]
! #ifdef USG
!   setpgrp ();         /* No arguments but equivalent in this case */
! #else
    setpgrp (pid, pid);
- #endif /* USG */
    setpgrp_of_tty (pid);

  #ifdef vipc
--- 374,381 ----
    close (err);

! #ifndef USG
    setpgrp (pid, pid);
    setpgrp_of_tty (pid);
+ #endif /* USG */

================================================================
--
--
   Bill Carpenter         att!ho5cad!wjc  or  attmail!bill

karl@dinosaur.cis.ohio-state.edu (Karl Kleinpaste) (05/02/89)

wjc@ho5cad.ATT.COM (Bill Carpenter) writes:
   After bringing our 18.53 to 18.54 by patching in the diffs, we notice
   the following behavior: hitting C-G kills subprocesses.
   Am I right in speculating that this part of the 18.54 changes is
   possibly to blame?

Almost certainly.  Since no setpgrp() is being executed any more, the
subprocesses are remaining attached to the pgrp where Emacs is
running.  Hence, since termio has ^G set to generate SIGINT, those
subprocesses are susceptible.  Put the setpgrp() back in and the
problem should disappear.

(I'd try it out myself, but I'm on the very edge of shutting down our
last SysV machine...)

--Karl

denny@mcmi.UUCP (Denny Page) (05/04/89)

wjc@ho5cad.ATT.COM (Bill Carpenter) writes:
>Using GNU Emacs 18.54.1 of Sun Apr 30 1989 on ho5cad (usg-unix-v)

GNU Emacs 18.54.1 of Wed May  3 1989 on mcmi (usg-unix-v)

(With both HAVE_PTYS and HAVE_SYSVIPC defined)


>hitting C-G kills subprocesses.

I have tested this on my 3B2/600 and do not have this problem.
Who's pty drivers are you running?
-- 
Someday never comes