- On Solaris: A terminal becomes the controlling terminal of a session
- if it is being open()ed, at a moment when
- 1. it is not already the controlling terminal of some session, and
- 2. the process that open()s it is a session leader that does not have
- a controlling terminal.
- We assume condition 1, try to ensure condition 2, and then open() it. */
+ On BSD and OSF/1: There is ioctl TIOCSCTTY for this purpose.
+ On Solaris:
+ A terminal becomes the controlling terminal of a session
+ if it is being open()ed, at a moment when
+ 1. it is not already the controlling terminal of some session, and
+ 2. the process that open()s it is a session leader that does not have
+ a controlling terminal.
+ We assume condition 1, try to ensure condition 2, and then open() it.
+ */