🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #843

Problem with shell subprocesses in Emacs 18.59

#843
From: Paul D. Smith
Date: Tue, 10 Nov 1992 12:40
57 lines
3111 bytes
Emacs 18.59, on DG AViiON running DG/UX.

I noticed after the previous patch I sent that subprocesses in Emacs
which use process groups (like shell mode) weren't accepting the INTR
and TSTP signals (C-c C-c and C-c C-z).

After a bit of poking in process.c:process_send_signal(), it turns out
that if you're using BSD ioctls (which we do on DG/UX) then TIOCGETC
is used to retrieve the proper char to send down the pipe, and if
you're using SysV then TCGETA ioctl is used.

However, on DG/UX for some reason neither of those is completely
accurate although both are supported: TIOCGETC returns a structure
containing all \0 chars and TCGETA returns the INTR char OK, but
returns \0 for TSTP.

However, I discovered that if you don't special-case either of these
and just pass them as normal signals to the subprocess via the
killpg() call, everything works fine.

So, what I did was to add a !defined(DGUX) to the #ifndef
SIGNALS_VIA_CHARACTERS in process.c (see below) so neither of the
switch (signo) constructs were compiled in (see patch below)

I'm not sure whether you want to add a new #define for this (systems
which don't need special handling of INTR, QUIT, and TSTP signals) or
just leave this as a special case for DGUX.

                                                                paul
-----
 ------------------------------------------------------------------
| Paul D. Smith                          |    paul_smith@dg.com    |
| Data General Corp.                     | pds@lemming.webo.dg.com |
| Network Systems Development Division   |                         |
| Open Network Systems Development       |   "Pretty Damn S..."    |
 ------------------------------------------------------------------
-------------------------------------------------------------------------------
--- process.c-dist      Sun Oct 25 00:42:04 1992
+++ process.c   Tue Nov 10 17:30:23 1992
@@ -2169,7 +2169,7 @@
     {
       /* If possible, send signals to the entire pgrp
         by sending an input character to it.  */
-#ifndef SIGNALS_VIA_CHARACTERS
+#if !defined (SIGNALS_VIA_CHARACTERS) && !defined (DGUX)
 #if defined (TIOCGLTC) && defined (TIOCGETC)
       struct tchars c;
       struct ltchars lc;
@@ -2192,7 +2192,7 @@
 #endif
        }
 #endif /* have TIOCGLTC and have TIOCGETC */
-#endif /* not SIGNALS_VIA_CHARACTERS */
+#endif /* not SIGNALS_VIA_CHARACTERS && not DGUX */
       /* It is possible that the following code would work
         on other kinds of USG systems, not just on the IRIS.
         This should be tried in Emacs 19.  */
Technical Details
Message-ID: <9211102240.AA22862@lemming.webo.dg.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!lemming.webo.dg.com!pds

Show Full Headers
Complete Article Headers
Newsgroups: gnu.emacs.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!lemming.webo.dg.com!pds
From: pds@lemming.webo.dg.com (Paul D. Smith)
Subject: Problem with shell subprocesses in Emacs 18.59
Message-ID: <9211102240.AA22862@lemming.webo.dg.com>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Tue, 10 Nov 1992 12:40:07 GMT
Approved: bug-gnu-emacs@prep.ai.mit.edu
Lines: 58