How can a process run with or without a tty, what's the difference?

How can a process run with or without a tty, what's the difference?
One of the early (1930) teletypes: Model 15 Teletype made by the teletype corporation https://en.wikipedia.org/wiki/Teletype_Corporation

A process can be associated with or run in the context of a TTY, which provides a text-based interface for the process. This means that the process will be able to read input from the TTY and write output to it. A process that is running without a TTY, on the other hand, will not have access to a text-based interface and will not be able to read user input or write output in the same way.

One important difference between running a process with or without a TTY is the way that the process handles signals. When a process is running in the context of a TTY, certain signals (such as SIGINT and SIGTSTP) can be generated by the user using special key sequences on the keyboard. These signals can be used to control the behavior of the process, such as interrupting it or suspending it. A process that is not running in the context of a TTY will not be able to receive these signals and will not be able to be controlled in the same way.

Another difference is the way that the process interacts with the terminal. When a process is running with a TTY, it has access to the terminal's input and output buffers, which allows it to read user input and write output in a way that is compatible with the terminal's behaviour. A process that is not running with a TTY, on the other hand, may not have access to these buffers and may not be able to interact with the terminal in the same way. This can affect the way that the process displays output and handles input.

See also https://tldp.org/HOWTO/Text-Terminal-HOWTO-7.html

Collect recurring payments with Subscribie - Try Now