1 .\" Copyright (c) 2005 by Michael Kerrisk <mtk.manpages@gmail.com>
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date. The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein. The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
25 .TH SIGSET 3 2021-03-22 "Linux" "Linux Programmer's Manual"
27 sigset, sighold, sigrelse, sigignore \- System V signal API
30 .B #include <signal.h>
32 .B typedef void (*sighandler_t)(int);
34 .BI "sighandler_t sigset(int " sig ", sighandler_t " disp );
36 .BI "int sighold(int " sig );
37 .BI "int sigrelse(int " sig );
38 .BI "int sigignore(int " sig );
42 Feature Test Macro Requirements for glibc (see
43 .BR feature_test_macros (7)):
52 .\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED
55 These functions are provided in glibc as a compatibility interface
56 for programs that make use of the historical System V signal API.
57 This API is obsolete: new applications should use the POSIX signal API
64 function modifies the disposition of the signal
68 argument can be the address of a signal handler function,
69 or one of the following constants:
72 Reset the disposition of
83 to the process's signal mask, but leave the disposition of
89 specifies the address of a signal handler, then
91 is added to the process's signal mask during execution of the handler.
95 was specified as a value other than
99 is removed from the process's signal mask.
111 to the calling process's signal mask.
117 from the calling process's signal mask.
121 function sets the disposition of
132 was blocked before the call,
133 or the signal's previous disposition
134 if it was not blocked before the call.
139 set to indicate the error.
140 (But see BUGS below.)
147 functions return 0 on success; on error, these functions return \-1 and set
149 to indicate the error.
170 For an explanation of the terms used in this section, see
178 Interface Attribute Value
184 T} Thread safety MT-Safe
190 SVr4, POSIX.1-2001, POSIX.1-2008.
191 These functions are obsolete: do not use them in new programs.
199 as obsolete, recommending the use of
202 .BR pthread_sigmask (3),
207 These functions appeared in glibc version 2.1.
211 type is a GNU extension; it is used on this page only to make the
213 prototype more easily readable.
217 function provides reliable signal handling semantics (as when calling
225 function provides unreliable semantics (as when calling
230 .IR "SA_RESETHAND | SA_NODEFER" ).
233 provides reliable semantics.
234 POSIX.1-2001 leaves these aspects of
241 In order to wait for a signal,
242 BSD and System V both provided a function named
244 but this function has a different argument on the two systems.
249 In versions of glibc before 2.2,
255 was specified as a value other than
258 In versions of glibc before 2.5,
260 does not correctly return the previous disposition of the signal
270 Instead, it should return the previous disposition of the signal
271 (unless the signal was blocked, in which case
274 Second, if the signal is currently blocked, then
275 the return value of a successful
279 Instead, the previous disposition of the signal is returned.
280 These problems have been fixed since glibc 2.5.
281 .\" See http://sourceware.org/bugzilla/show_bug.cgi?id=1951