Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)

signal(4) OSS System Calls Reference Manual
Continue execution
Restart the receiving process if it is stopped, or ignore the signal if the process is
already executing.
Stop process Stop the execution of the receiving process. When a process stops, a SIGCHLD
signal is sent to its parent process, unless the parent process has set the
SA_NOCLDSTOP bit.
While a process is stopped, any additional signals that are sent to the process are
not delivered until the process is continued. Exceptions to this are SIGKILL and
SIGABEND signals, which always terminate the receiving process. Any other
signal that causes process termination causes the same result as SIGKILL or
SIGABEND except when they are blocked. The other exception is the
SIGCONT signal, which causes the receiving process to restart or continue run-
ning, even if the signal is blocked or ignored.
Discard signal Ignore the signal. Delivery of the signal has no effect on the receiving process.
If a signal action is set to the SIG_DFL value while the signal is pending, the
signal remains pending.
Ignoring a Signal
A signal is ignored when a signal handler with the action set to SIG_IGN is installed for that
signal.
Delivery of the signal has no effect on the receiving process.
Note that the SIGKILL, SIGSTOP, and SIGABEND signals cannot be ignored.
Catching a Signal
Upon delivery of a signal that is to be caught, the receiving process is to run a signal-catching
function specified in either the sigaction() function call or the signal() function call. The signal-
catching function can be declared as follows:
void handler(
int signal);
The signal parameter is the signal number.
The process may choose to set up an alternate signal stack separate from the main process or
thread stack to launch the signal handler. This option allows the catching of the SIGSTK signal,
and any signals whose handler may overflow the process or thread stack. The signals to be
caught on the alternate signal stack may be specified on a signal-by-signal basis. See sigac-
tion(2) and sigaltstack(2) reference pages.
A new signal mask is calculated and installed for the duration of the signal-catching function or
until a sigprocmask() or sigsuspend() function call is made. This mask is formed by taking the
union of the process signal mask, the mask associated with the action for the signal being
delivered, and a mask corresponding to the signal being delivered.
The mask associated with the signal-catching function is not allowed to block those signals that
cannot be ignored. The system enforces this rule without causing an error to be indicated. If and
when the signal-catching function returns, the original signal mask is restored and the receiving
process resumes execution at the point it was interrupted.
1136 Hewlett-Packard Company 527186-023