1SIGVEC(3) Linux Programmer's Manual SIGVEC(3)
2
3
4
6 sigvec, sigblock, sigsetmask, siggetmask, sigmask - BSD signal API
7
9 #include <signal.h>
10
11 int sigvec(int sig, const struct sigvec *vec, struct sigvec *ovec);
12
13 int sigmask(int signum);
14
15 int sigblock(int mask);
16
17 int sigsetmask(int mask);
18
19 int siggetmask(void);
20
21 Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
22
23 All functions shown above:
24 Since glibc 2.19:
25 _DEFAULT_SOURCE
26 Glibc 2.19 and earlier:
27 _BSD_SOURCE
28
30 These functions are provided in glibc as a compatibility interface for
31 programs that make use of the historical BSD signal API. This API is
32 obsolete: new applications should use the POSIX signal API (sigac‐
33 tion(2), sigprocmask(2), etc.).
34
35 The sigvec() function sets and/or gets the disposition of the signal
36 sig (like the POSIX sigaction(2)). If vec is not NULL, it points to a
37 sigvec structure that defines the new disposition for sig. If ovec is
38 not NULL, it points to a sigvec structure that is used to return the
39 previous disposition of sig. To obtain the current disposition of sig
40 without changing it, specify NULL for vec, and a non-null pointer for
41 ovec.
42
43 The dispositions for SIGKILL and SIGSTOP cannot be changed.
44
45 The sigvec structure has the following form:
46
47 struct sigvec {
48 void (*sv_handler)(int); /* Signal disposition */
49 int sv_mask; /* Signals to be blocked in handler */
50 int sv_flags; /* Flags */
51 };
52
53 The sv_handler field specifies the disposition of the signal, and is
54 either: the address of a signal handler function; SIG_DFL, meaning the
55 default disposition applies for the signal; or SIG_IGN, meaning that
56 the signal is ignored.
57
58 If sv_handler specifies the address of a signal handler, then sv_mask
59 specifies a mask of signals that are to be blocked while the handler is
60 executing. In addition, the signal for which the handler is invoked is
61 also blocked. Attempts to block SIGKILL or SIGSTOP are silently
62 ignored.
63
64 If sv_handler specifies the address of a signal handler, then the
65 sv_flags field specifies flags controlling what happens when the han‐
66 dler is called. This field may contain zero or more of the following
67 flags:
68
69 SV_INTERRUPT
70 If the signal handler interrupts a blocking system call, then
71 upon return from the handler the system call s not be restarted:
72 instead it fails with the error EINTR. If this flag is not
73 specified, then system calls are restarted by default.
74
75 SV_RESETHAND
76 Reset the disposition of the signal to the default before