4

For a process, what are the differences between a controlling terminal and non-controlling terminal?

If a process calls open() on a terminal's device file, will the terminal become the controlling terminal of the process' session?

Are the following different:

  • creating a connection between a process and a controlling terminal and

  • creating a connection between a process and a noncontrolling terminal

Are they both done by the process calling open() on the controlling/noncontrolling terminal's device file?

Related Does the master device appear just like a standard terminal to the driver program?

  • Also related is unix.stackexchange.com/a/405780/5132 where back in 2017 I explained that it is actually sessions that are connected to controlling terminals. – JdeBP May 26 '18 at 22:43
  • Thanks. (1) "it is actually sessions that are connected to controlling terminals." If a session has a controlling terminal, does every process in the session has opened a file descriptor for the controlling terminal? (2) If a process has opened file descriptors for more than one terminals, how can we tell file descriptors which are for the controlling terminals of the process' session, from those which aref or noncontrolling terminals? – Tim May 28 '18 at 4:11
  • This is too broad a scope in my view. You have asked six questions in one, three of which are broad enough for individual full-length answers in their own rights. – JdeBP May 29 '18 at 10:25
  • Thanks. I am not very clear about what to separate out and what to keep here. I'd appreciate it if you could answer some relevant ones here. – Tim May 29 '18 at 11:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.