In article 38.5 , we pointed out that the ps command needs special options (-x for BSD and -e for System V) to list processes without a controlling terminal.
But just what is a controlling terminal? Just what it sounds like: the terminal from which the process was started. In the ps listing, this is usually given as a tty , or terminal id. That ps entry usually corresponds to a serial port, or a . A pty or "pseudo-terminal" is a construct that makes a window or look to the operating system just like a terminal.
In the ps
listing, a tty might appear as
How does a process "lose" its controlling terminal? Easy. Some processes, such as system never had one - they were started by system scripts that weren't started from any terminal, or they disconnected themselves from their controlling terminals. But it's also possible that you started a process running in the background, logged out, and logged back later or on another terminal to find it still running without a controlling terminal.