home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / std_unix / v22 / 038 / text0000.txt < prev   
Encoding:
Text File  |  1991-03-07  |  1.8 KB  |  40 lines

  1. Submitted-by: barmar@think.uucp (Barry Margolin)
  2.  
  3. In article <16118@cs.utexas.edu> sef@kithrup.COM (Sean Eric Fagan) writes:
  4. >In article <16068@cs.utexas.edu> thorinn@rimfaxe.diku.dk (Lars Henrik Mathiesen) writes:
  5. >>I'd very much hope that such an ioctl would include checks for the
  6. >>termio settings of the slave side: A signal should only be allowed if
  7. >>it would be possible to write a character on the master pty to achieve
  8. >>the same result. (And then, why not do just that?)
  9.  
  10. >Emacs defines C-xC-c in shell mode to be "interrupt-shell-subjob."  It is
  11.            ^^^^^^
  12.            C-cC-C
  13. >defined to send a SIGINT to the process group.  Not a control-c, or DEL, or
  14. >whatever you have your interrupt character defined as.
  15.  
  16. One problem I've run into with the current implementation is that it has
  17. trouble when I run a setuid program in the shell buffer.  The Emacs process
  18. can't send signals to the setuid process.  I ended up redefining C-cC-c and
  19. C-cC-z to just stuff ^C and ^Z into the pty.
  20.  
  21. However, your idea of an ioctl to send a signal to the other side of a pty
  22. (I assume that's what this is about, I missed the beginning of the
  23. discussion) seems like it would be just right.  Normal terminal users
  24. sometimes get stuck because a program disables control characters and then
  25. a bug sends it into an infinite loop.  The problem is the multiplexing of
  26. the keyboard for input to the program and process control.  On the other
  27. hand, when a program is being run through a pty there is no need to disable
  28. signals just because the signal *characters* are disabled.  Ioctls provide
  29. the needed out-of-band mechanism for process control that is not available
  30. on a real terminal.
  31.  
  32. --
  33. Barry Margolin, Thinking Machines Corp.
  34.  
  35. barmar@think.com
  36. {uunet,harvard}!think!barmar
  37.  
  38. Volume-Number: Volume 22, Number 38
  39.  
  40.