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 /* See feature_test_macros(7) */
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 For an explanation of the terms used in this section, see at‐
36 tributes(7).
37
38 ┌────────────────────────────────────────────┬───────────────┬─────────┐
39 │Interface │ Attribute │ Value │
40 ├────────────────────────────────────────────┼───────────────┼─────────┤
41 │sysv_signal() │ Thread safety │ MT-Safe │
42 └────────────────────────────────────────────┴───────────────┴─────────┘
43
45 This function is nonstandard.
46
48 Use of sysv_signal() should be avoided; use sigaction(2) instead.
49
50 On older Linux systems, sysv_signal() and signal(2) were equivalent.
51 But on newer systems, signal(2) provides reliable signal semantics; see
52 signal(2) for details.
53
54 The use of sighandler_t is a GNU extension; this type is defined only
55 if the _GNU_SOURCE feature test macro is defined.
56
58 sigaction(2), signal(2), bsd_signal(3), signal(7)
59
61 This page is part of release 5.13 of the Linux man-pages project. A
62 description of the project, information about reporting bugs, and the
63 latest version of this page, can be found at
64 https://www.kernel.org/doc/man-pages/.
65
66
67
68 2021-03-22 SYSV_SIGNAL(3)