Description | Tty input for background process |
---|---|
Default action | Suspends the process |
SA_SIGINFO macros | |
None |
On POSIX-compliant platforms, SIGTTIN is the signal sent to a process when it attempts to read from the tty while in the background. The symbolic constant for SIGTTIN is defined in the header file signal.h
. Symbolic signal names are used because signal numbers can vary across platforms.
SIG is a common prefix for signal names. TT is for tty, an abbreviation for teletypewriter, an archaic type of computer terminal. IN refers to input.
SIGTTIN may be sent to a background process that attempts to read from 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 SIGTTIN 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 SIGTTIN signal provides an alternative to this reliance on human interaction. On receiving the SIGTTIN, for instance, an appropriately coded program may opt to perform a default action rather than waiting for a human user to foreground it and respond.
Typically this signal applies to processes under job control; daemons do not have controlling terminals and should never receive this signal.
|