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  at‐
36       tributes(7).
37
38       ┌────────────────────────────────────────────┬───────────────┬─────────┐
39Interface                                   Attribute     Value   
40       ├────────────────────────────────────────────┼───────────────┼─────────┤
41sysv_signal()                               │ Thread safety │ MT-Safe │
42       └────────────────────────────────────────────┴───────────────┴─────────┘
43

CONFORMING TO

45       This function is nonstandard.
46

NOTES

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

SEE ALSO

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

COLOPHON

61       This page is part of release 5.12 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)
Impressum