V4/usr/man/man2/signal.2

Find at most related files.
including files from this version of Unix.

.th SIGNAL II 8/5/73
.sh NAME
signal \*- catch or ignore signals
.sh SYNOPSIS
(signal = 48.)
.br
.ft B
sys  signal; sig; value
.s3
signal(sig, func)
.br
int (*func)();
.ft R
.sh DESCRIPTION
When the signal
defined by
.it sig
is sent to the current process,
it is to be treated according to
.it value.
The following is the list of signals:
.s3
.lp +10 5
1	hangup
.lp +10 5
2	interrupt
.lp +10 5
3*	quit
.lp +10 5
4*	illegal instruction
.lp +10 5
5*	trace trap
.lp +10 5
6*	IOT instruction
.lp +10 5
7*	EMT instruction
.lp +10 5
8*	floating point exception
.lp +10 5
9	kill (cannot be caught or ignored)
.lp +10 5
10*	bus error
.lp +10 5
11*	segmentation violation
.lp +10 5
12*	bad argument to sys call
.s3
.i0
If
.it value
is 0, the default system
action applies to the signal.
This is processes termination
with or without a core dump.
If
.it value
is odd, the signal is ignored.
Any other even
.it value
specifies an address in the process
where an interrupt is simulated.
An RTI instruction will return from the
interrupt.
As a signal is caught,
it is reset to 0.
Thus if it is desired to
catch every such signal,
the catching routine must
issue another
.it signal
call.
.s3
The starred signals in the list above
cause core images if not caught and not ignored.
In C,
if
.it func
is 0 or 1, the action is as described above.
If
.it func
is even, it is assumed to be the address
of a function entry point.
When the signal occurs,
the function will be called.
A return from the function will
simulate the RTI.
.s3
After a
.it fork,
the child inherits
all signals.
The
.it exec
call resets all
caught signals to default action.
.sh "SEE ALSO"
kill (I, II)
.sh DIAGNOSTICS
The error bit
(c-bit)
is set if the
given signal is out of range.
In C, a \*-1 indicates an error;
0 indicates success.