home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / gnu / emacs / bug / 1464 < prev    next >
Encoding:
Text File  |  1992-11-10  |  3.0 KB  |  71 lines

  1. Newsgroups: gnu.emacs.bug
  2. Path: 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
  3. From: pds@lemming.webo.dg.com (Paul D. Smith)
  4. Subject: Problem with shell subprocesses in Emacs 18.59
  5. Message-ID: <9211102240.AA22862@lemming.webo.dg.com>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: GNUs Not Usenet
  8. Distribution: gnu
  9. Date: Tue, 10 Nov 1992 12:40:07 GMT
  10. Approved: bug-gnu-emacs@prep.ai.mit.edu
  11. Lines: 58
  12.  
  13. Emacs 18.59, on DG AViiON running DG/UX.
  14.  
  15. I noticed after the previous patch I sent that subprocesses in Emacs
  16. which use process groups (like shell mode) weren't accepting the INTR
  17. and TSTP signals (C-c C-c and C-c C-z).
  18.  
  19. After a bit of poking in process.c:process_send_signal(), it turns out
  20. that if you're using BSD ioctls (which we do on DG/UX) then TIOCGETC
  21. is used to retrieve the proper char to send down the pipe, and if
  22. you're using SysV then TCGETA ioctl is used.
  23.  
  24. However, on DG/UX for some reason neither of those is completely
  25. accurate although both are supported: TIOCGETC returns a structure
  26. containing all \0 chars and TCGETA returns the INTR char OK, but
  27. returns \0 for TSTP.
  28.  
  29. However, I discovered that if you don't special-case either of these
  30. and just pass them as normal signals to the subprocess via the
  31. killpg() call, everything works fine.
  32.  
  33. So, what I did was to add a !defined(DGUX) to the #ifndef
  34. SIGNALS_VIA_CHARACTERS in process.c (see below) so neither of the
  35. switch (signo) constructs were compiled in (see patch below)
  36.  
  37. I'm not sure whether you want to add a new #define for this (systems
  38. which don't need special handling of INTR, QUIT, and TSTP signals) or
  39. just leave this as a special case for DGUX.
  40.  
  41.                                                                 paul
  42. -----
  43.  ------------------------------------------------------------------
  44. | Paul D. Smith                          |    paul_smith@dg.com    |
  45. | Data General Corp.                     | pds@lemming.webo.dg.com |
  46. | Network Systems Development Division   |                         |
  47. | Open Network Systems Development       |   "Pretty Damn S..."    |
  48.  ------------------------------------------------------------------
  49. -------------------------------------------------------------------------------
  50. --- process.c-dist      Sun Oct 25 00:42:04 1992
  51. +++ process.c   Tue Nov 10 17:30:23 1992
  52. @@ -2169,7 +2169,7 @@
  53.      {
  54.        /* If possible, send signals to the entire pgrp
  55.          by sending an input character to it.  */
  56. -#ifndef SIGNALS_VIA_CHARACTERS
  57. +#if !defined (SIGNALS_VIA_CHARACTERS) && !defined (DGUX)
  58.  #if defined (TIOCGLTC) && defined (TIOCGETC)
  59.        struct tchars c;
  60.        struct ltchars lc;
  61. @@ -2192,7 +2192,7 @@
  62.  #endif
  63.         }
  64.  #endif /* have TIOCGLTC and have TIOCGETC */
  65. -#endif /* not SIGNALS_VIA_CHARACTERS */
  66. +#endif /* not SIGNALS_VIA_CHARACTERS && not DGUX */
  67.        /* It is possible that the following code would work
  68.          on other kinds of USG systems, not just on the IRIS.
  69.          This should be tried in Emacs 19.  */
  70.  
  71.