1SYSV_SIGNAL(3) Linux Programmer's Manual SYSV_SIGNAL(3)
2
3
4
6 sysv_signal - signal handling with System V semantics
7
9 #define _GNU_SOURCE
10 #include <signal.h>
11
12 typedef void (*sighandler_t)(int);
13
14 sighandler_t sysv_signal(int signum, sighandler_t handler);
15
17 The sysv_signal() function takes the same arguments, and performs the
18 same task, as signal(2).
19
20 However sysv_signal() provides the System V unreliable signal seman‐
21 tics, that is: a) the disposition of the signal is reset to the default
22 when the handler is invoked; b) delivery of further instances of the
23 signal is not blocked while the signal handler is executing; and c) if
24 the handler interrupts (certain) blocking system calls, then the system
25 call is not automatically restarted.
26
28 The sysv_signal() function returns the previous value of the signal
29 handler, or SIG_ERR on error.
30
32 As for signal(2).
33
35 This function is non-standard.
36
38 Use of sysv_signal() should be avoided; use sigaction(2) instead.
39
40 On older Linux systems, sysv_signal() and signal(2) were equivalent.
41 But on newer systems, signal(2) provides reliable signal semantics; see
42 signal(2) for details.
43
44 The use of sighandler_t is a GNU extension; this type is only defined
45 if the _GNU_SOURCE feature test macro is defined.
46
48 sigaction(2), signal(2), bsd_signal(3), feature_test_macros(7), sig‐
49 nal(7)
50
52 This page is part of release 3.22 of the Linux man-pages project. A
53 description of the project, and information about reporting bugs, can
54 be found at http://www.kernel.org/doc/man-pages/.
55
56
57
58 2007-05-04 SYSV_SIGNAL(3)