home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.18 / text0007.txt < prev    next >
Encoding:
Internet Message Format  |  1990-03-18  |  2.4 KB

  1. From: gerry@SSD.CSD.HARRIS.COM (Gerry Baumgartner)
  2.  
  3. I have a few questions on controlling terminals in POSIX.   I don't know 
  4. whether the supplements address these questions.
  5.  
  6. 1) 7.1.1.3  "The Controlling Terminal" says that a process relinquishes its
  7. controlling terminal when it creates a new session with setsid(), or when all
  8. file descriptors associated with the controlling terminal have been closed.
  9. Also, if a process which is not a session leader opens a terminal file, that
  10. terminal shall not become the controlling terminal of the calling process.
  11.  
  12. Currently in the System V implemention, after a process has closed all it's
  13. file descriptors to the controlling terminal, he CAN open /dev/tty and be
  14. "reconnected" to it, and thus have a controlling terminal again.  But /dev/tty 
  15. is a terminal file isn't it?  Does that mean that it should not be allowed to
  16. be opened after a process has "relinquished" it?   I understand that if the
  17. controlling terminal was say, /dev/tty15, and a non-session-leader relinquished
  18. it and the tried to open /dev/tty23, the new tty should not become the
  19. controlling terminal for the process.   But /dev/tty seems to be a special
  20. case that the standard doesn't address.
  21.  
  22. And it seems to me the only time that "relinquishing" a controlling terminal 
  23. has any real consequences is when the session leader does it.  At that point, 
  24. in the words of the standard, processes of the session MAY be denied access to
  25. what once was their controlling    terminal. 
  26.  
  27. 2) 7.1.1.9  "Special Characters", for INTR and QUIT says that the signal is
  28. sent to all processes in the foreground process group for which the terminal is
  29. the controlling terminal.
  30.  
  31. This to me is somewhat ambiguous.  Do all the processes in the foreground
  32. process group get the signal or just those processes that have not relinquished
  33. their controlling terminal by closing all their file descriptors to it?
  34.  
  35.  
  36. Any comments regarding these questions would be appreciated.
  37. -------------------------------------------------------------------------------
  38. Gerry Baumgartner                |    gerry@ssd.csd.harris.com 
  39. System Software Development      | or gerry%ssd.csd.harris.com@eddie.mit.edu
  40. Harris Computer Systems Division | or ...!{mit-eddie,uunet,novavax}!hcx1!gerry
  41. Fort Lauderdale FL 33309         |
  42. -------------------------------------------------------------------------------
  43.  
  44. Volume-Number: Volume 18, Number 7
  45.  
  46.