1

In a process session with a controlling terminal,

  • if the controlling process closes the file descriptor of the controlling terminal, does the process session become detached from the controlling terminal, i.e. not have any controlling terminal?

  • What if a non-controlling process in the session closes the file descriptor of the controlling terminal?

Thanks.

2

libc manual: "… All the processes in a session inherit the controlling terminal from the session leader. A session leader that has control of a terminal is called the controlling process of that terminal. …"

According to typical "daemonize" scenario the only way to get rid of controlling terminal is to create new session. Closing file descriptors wouldn't do that.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.