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

NAME

6       sigvec, sigblock, sigsetmask, siggetmask, sigmask - BSD signal API
7

SYNOPSIS

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       int sigsetmask(int mask);
17       int siggetmask(void);
18
19   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
20
21       All functions shown above:
22           Since glibc 2.19:
23               _DEFAULT_SOURCE
24           Glibc 2.19 and earlier:
25               _BSD_SOURCE
26

DESCRIPTION

28       These  functions are provided in glibc as a compatibility interface for
29       programs that make use of the historical BSD signal API.  This  API  is
30       obsolete:  new  applications  should  use  the POSIX signal API (sigac‐
31       tion(2), sigprocmask(2), etc.).
32
33       The sigvec() function sets and/or gets the disposition  of  the  signal
34       sig  (like the POSIX sigaction(2)).  If vec is not NULL, it points to a
35       sigvec structure that defines the new disposition for sig.  If ovec  is
36       not  NULL,  it  points to a sigvec structure that is used to return the
37       previous disposition of sig.  To obtain the current disposition of  sig
38       without  changing  it, specify NULL for vec, and a non-null pointer for
39       ovec.
40
41       The dispositions for SIGKILL and SIGSTOP cannot be changed.
42
43       The sigvec structure has the following form:
44
45           struct sigvec {
46               void (*sv_handler)(int); /* Signal disposition */
47               int    sv_mask;          /* Signals to be blocked in handler */
48               int    sv_flags;         /* Flags */
49           };
50
51       The sv_handler field specifies the disposition of the  signal,  and  is
52       either:  the address of a signal handler function; SIG_DFL, meaning the
53       default disposition applies for the signal; or  SIG_IGN,  meaning  that
54       the signal is ignored.
55
56       If  sv_handler  specifies the address of a signal handler, then sv_mask
57       specifies a mask of signals that are to be blocked while the handler is
58       executing.  In addition, the signal for which the handler is invoked is
59       also blocked.  Attempts to block SIGKILL or SIGSTOP  are  silently  ig‐
60       nored.
61
62       If  sv_handler  specifies  the  address  of  a signal handler, then the
63       sv_flags field specifies flags controlling what happens when  the  han‐
64       dler  is  called.  This field may contain zero or more of the following
65       flags:
66
67       SV_INTERRUPT
68              If the signal handler interrupts a blocking  system  call,  then
69              upon  return  from the handler the system call is not restarted:
70              instead it fails with the error EINTR.   If  this  flag  is  not
71              specified, then system calls are restarted by default.
72
73       SV_RESETHAND
74              Reset  the disposition of the signal to the default before call‐
75              ing the signal handler.