set a signal action
cc . . . -lc
void (*signal (int sig, void (*func) (int))) (int);
routine is not considered to be completely reliable
for some applications. Therefore, it is strongly
recommended that the
routine, which supersedes the
routine, be used in all new applications instead.
The signal and the sigaction
routines should never be used in the same application
to control the same signal as this results in
undefined behavior of the
routine is still included largely for
allows the calling process to choose one of three ways
to handle the receipt of a specified signal.
specifies the particular signal and
specifies the course of action to be taken.
argument can be assigned any of the values documented on the
except SIGKILL and SIGSTOP.
A call to signal cancels a pending signal sig
except for a pending
SIGKILL or SIGSTOP signal.
Upon successful completion,
returns the previous value of
for the specified signal
Otherwise, a value of SIG_ERR is returned and
is set to indicate the error.
SIG_ERR is defined in the include file <signal.h>.
If the following condition occurs,
the signal routine returns a value of SIG_ERR
in func and sets errno
to the corresponding value:
The value of the sig
argument is an invalid or unsupported signal number, or an
attempt was made to catch a signal that cannot be caught
or to ignore a signal that cannot be ignored.
signal is conformant with:
X/Open Portability Guide, Issue 3, 1989
ANSI X3.159-1989 Programming Language -- C
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003