SIGTTOU
From Wikipedia, the free encyclopedia
|
|||||
|
SA_SIGINFO macros
|
|||||
|---|---|---|---|---|---|
| None
|
|||||
On POSIX-compliant platforms, SIGTTOU is the signal thrown by computer programs that attempt to write to the tty while in the background. The symbolic constant for SIGTTOU is defined in the header file signal.h. Symbolic signal names are used because signal numbers can vary across platforms.
[edit] Etymology
SIG is a common prefix for signal names. TT stands for tty, an abbreviation for teletypewriter, an archaic type of computer terminal. OU refers to output.
[edit] Usage
SIGTTOU may be sent to a background process that attempts to write to its controlling terminal. In practical terms this controlling terminal is usually an interactive terminal session at which the user initiated the background job.
The default action of SIGTTOU is to stop the process. Background processes thus suspended can be placed into the foreground to accept input by the shell using the fg command or by sending them the SIGCONT signal.
The SIGTTOU signal provides an alternative to this reliance on human interaction. On receiving the SIGTTOU, for instance, an appropriately coded program may opt to perform a default action rather than waiting for a human user to foreground it and receive the output on the terminal.
In practice shells often override the default Stop action so that background jobs deliver their output to the controlling terminal by default.
[edit] See also
- SIGTTIN - a corresponding signal sent to a process that tries to read from its controlling terminal.
|
||||||||

