2 .\" Copyright (c) 2005 by Michael Kerrisk <mtk.manpages@gmail.com>
4 .\" %%%LICENSE_START(VERBATIM)
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date. The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein. The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
26 .TH SIGSET 3 2017-09-15 "Linux" "Linux Programmer's Manual"
28 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 );
38 .BI "int sigrelse(int " sig );
40 .BI "int sigignore(int " sig );
43 Feature Test Macro Requirements for glibc (see
44 .BR feature_test_macros (7)):
54 _XOPEN_SOURCE\ >=\ 500
55 .\" || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
59 These functions are provided in glibc as a compatibility interface
60 for programs that make use of the historical System V signal API.
61 This API is obsolete: new applications should use the POSIX signal API
68 function modifies the disposition of the signal
72 argument can be the address of a signal handler function,
73 or one of the following constants:
76 Reset the disposition of
87 to the process's signal mask, but leave the disposition of
93 specifies the address of a signal handler, then
95 is added to the process's signal mask during execution of the handler.
99 was specified as a value other than
103 is removed from the process's signal mask.
115 to the calling process's signal mask.
121 from the calling process's signal mask.
125 function sets the disposition of
136 was blocked before the call,
137 or the signal's previous disposition
138 if it was not blocked before the call.
143 set to indicate the error.
144 (But see BUGS below.)
151 functions return 0 on success; on error, these functions return \-1 and set
153 to indicate the error.
174 For an explanation of the terms used in this section, see
180 Interface Attribute Value
187 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