1SIGEMPTYSET(3P) POSIX Programmer's Manual SIGEMPTYSET(3P)
2
3
4
6 This manual page is part of the POSIX Programmer's Manual. The Linux
7 implementation of this interface may differ (consult the corresponding
8 Linux manual page for details of Linux behavior), or the interface may
9 not be implemented on Linux.
10
12 sigemptyset - initialize and empty a signal set
13
15 #include <signal.h>
16
17 int sigemptyset(sigset_t *set);
18
19
21 The sigemptyset() function initializes the signal set pointed to by
22 set, such that all signals defined in IEEE Std 1003.1-2001 are
23 excluded.
24
26 Upon successful completion, sigemptyset() shall return 0; otherwise, it
27 shall return -1 and set errno to indicate the error.
28
30 No errors are defined.
31
32 The following sections are informative.
33
35 None.
36
38 None.
39
41 The implementation of the sigemptyset() (or sigfillset()) function
42 could quite trivially clear (or set) all the bits in the signal set.
43 Alternatively, it would be reasonable to initialize part of the struc‐
44 ture, such as a version field, to permit binary-compatibility between
45 releases where the size of the set varies. For such reasons, either
46 sigemptyset() or sigfillset() must be called prior to any other use of
47 the signal set, even if such use is read-only (for example, as an argu‐
48 ment to sigpending()). This function is not intended for dynamic allo‐
49 cation.
50
51 The sigfillset() and sigemptyset() functions require that the resulting
52 signal set include (or exclude) all the signals defined in this volume
53 of IEEE Std 1003.1-2001. Although it is outside the scope of this vol‐
54 ume of IEEE Std 1003.1-2001 to place this requirement on signals that
55 are implemented as extensions, it is recommended that implementation-
56 defined signals also be affected by these functions. However, there may
57 be a good reason for a particular signal not to be affected. For exam‐
58 ple, blocking or ignoring an implementation-defined signal may have
59 undesirable side effects, whereas the default action for that signal is
60 harmless. In such a case, it would be preferable for such a signal to
61 be excluded from the signal set returned by sigfillset().
62
63 In early proposals there was no distinction between invalid and unsup‐
64 ported signals (the names of optional signals that were not supported
65 by an implementation were not defined by that implementation). The
66 [EINVAL] error was thus specified as a required error for invalid sig‐
67 nals. With that distinction, it is not necessary to require implementa‐
68 tions of these functions to determine whether an optional signal is
69 actually supported, as that could have a significant performance impact
70 for little value. The error could have been required for invalid sig‐
71 nals and optional for unsupported signals, but this seemed unnecessar‐
72 ily complex. Thus, the error is optional in both cases.
73
75 None.
76
78 Signal Concepts, sigaction(), sigaddset(), sigdelset(), sigfillset(),
79 sigismember(), sigpending(), sigprocmask(), sigsuspend(), the Base Def‐
80 initions volume of IEEE Std 1003.1-2001, <signal.h>
81
83 Portions of this text are reprinted and reproduced in electronic form
84 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
85 -- Portable Operating System Interface (POSIX), The Open Group Base
86 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
87 Electrical and Electronics Engineers, Inc and The Open Group. In the
88 event of any discrepancy between this version and the original IEEE and
89 The Open Group Standard, the original IEEE and The Open Group Standard
90 is the referee document. The original Standard can be obtained online
91 at http://www.opengroup.org/unix/online.html .
92
93
94
95IEEE/The Open Group 2003 SIGEMPTYSET(3P)