0

This tutorial says the following:

Every session is tied to a terminal from which processes in the session get their input and to which they send their output.

I think that this statement is incorrect, because say that I opened some program from the terminal (this program/process will be in the session connected to the terminal) and I redirected this program's stdout to a file. Now the program is not sending its output to the terminal.

Am I correct?

0

The statement correctly describes the nominal case: open a terminal, run a shell in its own session in this terminal, and run further programs from the shell. You are correct that the statement is not true in general: any process can send output and receive input from anywhere, not just the session's controlling terminal. Shell redirections are the most common way to make a process's standard input or output be something other than the terminal.

Don't expect a tutorial to cover all the cases. If it did, it would be incomprehensible.

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.