home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.22 / text0043.txt < prev    next >
Encoding:
Text File  |  1991-03-06  |  1.9 KB  |  44 lines

  1. Submitted-by: thorinn@diku.dk (Lars Henrik Mathiesen)
  2.  
  3. sef@kithrup.COM (Sean Eric Fagan) writes:
  4. >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. >Because that won't support existing practice.
  11.  
  12. >Emacs defines C-xC-c in shell mode to be "interrupt-shell-subjob."  It is
  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.  Note that emacs
  15. >terminates the shell by sending it (I believe) a SIGTERM.  What keyboard
  16. >sequence generates that signal?
  17.     
  18. That is exactly the point: Keyboard generated signals are more
  19. powerful than the kill system call, because uids are not checked.
  20. Under ``existing practice'' you can send SIGINT, SIGQUIT or SIGTSTP to
  21. all processes in the process group of a pseudo-tty, _even_if_ some of
  22. them are set-uid to someone else.
  23.  
  24. But a set-uid root program can assume that a SIGTERM comes from a
  25. super-user. If a new ioctl allows any signal to be sent without
  26. checking uids, the rules have been changed (not nice). If it checks
  27. uids for all signals, it's less powerful than keyboard signals, and
  28. why bother to learn about it?
  29.  
  30. By the way, I will hazard a guess: Most, if not all, of the UNIX
  31. variants where the existing practice of Emacs doesn't work will have
  32. SYSV termios ioctls. So instead of putting in ifdefs for two or three
  33. subtly incompatible new TIOCSENDSIGs, we might as well put in the four
  34. lines to get a termios structure and stuff the appropriate character
  35. down the master pty.
  36.  
  37. --
  38. Lars Mathiesen, DIKU, U of Copenhagen, Denmark      [uunet!]mcsun!diku!thorinn
  39. Institute of Datalogy -- we're scientists, not engineers.      thorinn@diku.dk
  40.  
  41.  
  42. Volume-Number: Volume 22, Number 45
  43.  
  44.