SIGACTION
Section: Linux Programmer's Manual (2)
Updated: 24 September 1994
Index
Return to Main Contents
NAME
signal - ANSI C signal handling.
SYNOPSIS
#include <signal.h>
void (*signal(int signum, void (*handler)(int)))(int);
DESCRIPTION
The
signal
system call installs a new signal handler for signal
signum.
The signal handler is set to
handler
which may be a user specified function, or one of the following:
-
- SIG_IGN
-
Ignore the signal.
- SIG_DFL
-
Reset the signal to its default behavior.
RETURN VALUE
signal
returns the previous value of the signal handler, or
SIG_ERR
on error.
NOTES
Signal handlers cannot be set for
SIGKILL
or
SIGSTOP.
Unlike BSD systems, signals under Linux are reset to their default
behavior when raised.
If you're confused by the prototype at the top of this manpage, it
may help to see it separated out thus:
typedef void (*sighandler_t)(int);
sighandler_t signal(int signum, sighandler_t handler);
CONFORMING TO
ANSI C
SEE ALSO
kill(1), kill(2), killpg(2), pause(2), raise(3),
sigaction(2), signal(7), sigsetops(3), sigvec(2)
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- RETURN VALUE
-
- NOTES
-
- CONFORMING TO
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 12:25:02 GMT, March 22, 2025