home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / mod.std.unix.v8 / text0019.txt < prev    next >
Encoding:
Internet Message Format  |  1987-06-30  |  1.9 KB

  1. From: guy@sun.com (Guy Harris)
  2. Date: Mon, 3 Nov 86 00:39:00 PST
  3.  
  4. > > >          If    the process is a session process group leader, the
  5. > > >          SIGHUP signal may be sent to each process that has    a
  6. > >                ^^^ should be replaced by the word "will"
  7. > > >          process group ID equal to that of the calling process;
  8.  
  9. > "May" is used here to allow 4.2 systems to conform.  4.2 does not
  10. > send SIGHUP on process group leader death.
  11.  
  12. 4.2 also doesn't have the notion of a "session process group leader".
  13. However, when the moral equivalent of a "session process group leader" dies
  14. in 4.2, 99.99% of the time it's a login shell, and "init" proceeds to do a
  15. "vhangup" which - sends a SIGHUP!
  16.  
  17. > vhangup() is indeed desirable.  It is not required in POSIX because it is 
  18. > not supported on System V and, indeed, breaks System V compatiblity.
  19.  
  20. Only if you define "System V compatibility" as "behaves exactly the same as
  21. some particular implementation of System V".  "vhangup" does two things; it
  22. sends a SIGHUP to the process group of the terminal in question (which is,
  23. in fact, similar to what S5 does automatically) and it invalidates file
  24. descriptors that refer to the terminal.
  25.  
  26. Some System V implementations do not do this, although they *do* clear the
  27. terminal's process group, which causes all subsequent references to that
  28. terminal through "/dev/tty" to get an error.  As such, the evidence
  29. indicates that the reason they don't generally invalidate references to the
  30. controlling terminal is *not* that they intended to leave such references
  31. valid, but that they just didn't bother.
  32.  
  33. The only programs *I* can think of that would want to be able to reference
  34. the terminal they were started from, even after the user who started them
  35. logged out, are not the sort of programs I would like to have running on any
  36. machine I'm involved with.  They tend to be called things like "Trojan
  37. horses".
  38.  
  39. Volume-Number: Volume 8, Number 20
  40.  
  41.