Name
raise
Synopsis
Raises a signal
#include <signal.h> intraise
( intsig
);
The raise()
function sends
the signal identified by sig
to the
program. If the program has installed a handler for the given signal
by means of a call to the signal()
function, then that handler
routine runs when the signal is raised, and raise()
does not return until the handler
function has returned. If the signal handler doesn’t end the
program, the return value of raise()
is 0 if it succeeds in raising the
signal, otherwise a nonzero value.
Tip
Macros for values of the argument
sig
are defined in the standard header
signal.h, and are described
under signal()
in this
chapter.
Example
See the example for signal()
in this
chapter.
See Also
Get C in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.