You can start with the POSIX spec . From there, read about the "control terminal" of the process.
But simple, for example ... / dev / tty: how the ssh command can read your password, even if its standard input comes from somewhere else:
tar cf - . | ssh dest 'tar xf -'
If ssh decides to request a password, it will read it / dev / tty instead of stdin.
Conceptually, / dev / tty is a “keyboard and text terminal”. More or less.
source
share