1SYSV_SIGNAL(3)             Linux Programmer's Manual            SYSV_SIGNAL(3)
2
3
4

NAME

6       sysv_signal - signal handling with System V semantics
7

SYNOPSIS

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

DESCRIPTION

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

RETURN VALUE

28       The  sysv_signal()  function  returns  the previous value of the signal
29       handler, or SIG_ERR on error.
30

ERRORS

32       As for signal(2).
33

ATTRIBUTES

35       For  an  explanation  of  the  terms  used   in   this   section,   see
36       attributes(7).
37
38       ┌──────────────┬───────────────┬─────────┐
39Interface     Attribute     Value   
40       ├──────────────┼───────────────┼─────────┤
41sysv_signal() │ Thread safety │ MT-Safe │
42       └──────────────┴───────────────┴─────────┘

CONFORMING TO

44       This function is nonstandard.
45

NOTES

47       Use of sysv_signal() should be avoided; use sigaction(2) instead.
48
49       On  older  Linux  systems, sysv_signal() and signal(2) were equivalent.
50       But on newer systems, signal(2) provides reliable signal semantics; see
51       signal(2) for details.
52
53       The  use  of sighandler_t is a GNU extension; this type is defined only
54       if the _GNU_SOURCE feature test macro is defined.
55

SEE ALSO

57       sigaction(2), signal(2), bsd_signal(3), signal(7)
58

COLOPHON

60       This page is part of release 5.07 of the Linux  man-pages  project.   A
61       description  of  the project, information about reporting bugs, and the
62       latest    version    of    this    page,    can     be     found     at
63       https://www.kernel.org/doc/man-pages/.
64
65
66
67                                  2017-09-15                    SYSV_SIGNAL(3)
Impressum