SIGTTIN
Encyclopedia
On POSIX
POSIX
POSIX , an acronym for "Portable Operating System Interface", is a family of standards specified by the IEEE for maintaining compatibility between operating systems...

-compliant platforms, SIGTTIN is the signal
Signal (computing)
A signal is a limited form of inter-process communication used in Unix, Unix-like, and other POSIX-compliant operating systems. Essentially it is an asynchronous notification sent to a process in order to notify it of an event that occurred. When a signal is sent to a process, the operating system...

 sent to a process
Process (computing)
In computing, a process is an instance of a computer program that is being executed. It contains the program code and its current activity. Depending on the operating system , a process may be made up of multiple threads of execution that execute instructions concurrently.A computer program is a...

 when it attempts to read from the tty while in the background. The symbolic constant
C preprocessor
The C preprocessor is the preprocessor for the C and C++ computer programming languages. The preprocessor handles directives for source file inclusion , macro definitions , and conditional inclusion ....

 for SIGTTIN is defined in the header file
Header file
Some programming languages use header files. These files allow programmers to separate certain elements of a program's source code into reusable files. Header files commonly contain forward declarations of classes, subroutines, variables, and other identifiers...

 signal.h. Symbolic signal names are used because signal numbers can vary across platforms.

Etymology

SIG is a common prefix for signal names. TT is for tty, an abbreviation for teletypewriter, an archaic type of computer terminal
Computer terminal
A computer terminal is an electronic or electromechanical hardware device that is used for entering data into, and displaying data from, a computer or a computing system...

. IN refers to input
Input/output
In computing, input/output, or I/O, refers to the communication between an information processing system , and the outside world, possibly a human, or another information processing system. Inputs are the signals or data received by the system, and outputs are the signals or data sent from it...

.

Usage

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
Unix shell
A Unix shell is a command-line interpreter or shell that provides a traditional user interface for the Unix operating system and for Unix-like systems...

 using the fg command
Fg (Unix)
fg is a job control command in Unix and Unix-like operating systems that resumes execution of a suspended process by bringing it to the foreground and thus redirecting its standard input and output streams to the user's terminal...

 or by sending them the SIGCONT
SIGCONT
On POSIX-compliant platforms, SIGCONT is the signal sent to restart a process previously paused by the SIGSTOP or SIGTSTP signal. The symbolic constant for SIGCONT is defined in the header file signal.h. Symbolic signal names are used because signal numbers can vary across platforms.-Etymology:SIG...

 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
Daemon (computer software)
In Unix and other multitasking computer operating systems, a daemon is a computer program that runs as a background process, rather than being under the direct control of an interactive user...

 do not have controlling terminals and should never receive this signal.

See also

  • SIGTTOU
    SIGTTOU
    On POSIX-compliant platforms, SIGTTOU is the signal sent to a process when it attempts 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...

    - a corresponding signal received if a background process tries to write to its controlling terminal.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK