Signal actions
Signals interrupt the normal flow of control in a process.
Signals do not direct the execution of a process; but rather, request that the process take some action.
For most signals,
a process can arrange to respond in one of the following ways:
-
terminate on receipt of the signal
-
ignore it completely
-
catch it and act on it in some way defined by the user process.
The chosen response for each signal
is known as the signal's ``disposition''.
For example, an interrupt signal may be sent by pressing
an appropriate key on the terminal
(``delete'', ``break'' or ``rubout'').
The action taken depends on the requirements of the specific program being executed.
For example:
-
The shell invokes most commands in such a way that they stop executing immediately (die) when an interrupt is received.
For example, the pr (print) command normally dies, allowing the user to stop unwanted output.
-
The shell itself ignores interrupts when reading from the terminal because the shell should continue execution even when the user stops a command like pr.
-
The editor ed chooses to catch interrupts so that it can halt its current action (especially printing) without allowing itself to be terminated.
A signal is said to be ``delivered'' to a process when the process receives the signal and takes the action established for it.
Signal delivery resembles the occurrence of a hardware interrupt:
the signal is normally blocked from further occurrence,
the current process context is saved, and a new one is built.
Next topic:
Signal handlers
Previous topic:
Signal types
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005