2 .\" Copyright (c) 2005 by Michael Kerrisk <mtk.manpages@gmail.com>
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.
24 .TH SIGSET 3 2010-09-20 "Linux" "Linux Programmer's Manual"
26 sigset, sighold, sigrelse, sigignore \- System V signal API
28 .B #include <signal.h>
30 .B typedef void (*sighandler_t)(int);
32 .BI "sighandler_t sigset(int " sig ", sighandler_t " disp );
34 .BI "int sighold(int " sig );
36 .BI "int sigrelse(int " sig );
38 .BI "int sigignore(int " sig );
41 Feature Test Macro Requirements for glibc (see
42 .BR feature_test_macros (7)):
52 _XOPEN_SOURCE\ >=\ 500 ||
53 _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
57 These functions are provided in glibc as a compatibility interface
58 for programs that make use of the historical System V signal API.
59 This API is obsolete: new applications should use the POSIX signal API
66 function modifies the disposition of the signal
70 argument can be the address of a signal handler function,
71 or one of the following constants:
74 Reset the disposition of
85 to the process's signal mask, but leave the disposition of
91 specifies the address of a signal handler, then
93 is added to the process's signal mask during execution of the handler.
97 was specified as a value other than
101 is removed from the process's signal mask.
113 to the calling process's signal mask.
119 from the calling process's signal mask.
123 function sets the disposition of
134 was blocked before the call,
135 or the signal's previous disposition
136 if it was not blocked before the call.
141 set to indicate the error.
142 (But see BUGS below.)
149 functions return 0 on success; on error, these functions return \-1 and set
151 to indicate the error.
173 These functions are obsolete: do not use them in new programs.
181 as obsolete, recommending the use of
184 .BR pthread_sigmask (3),
189 These functions appeared in glibc version 2.1.
193 type is a GNU extension; it is only used on this page to make the
195 prototype more easily readable.
199 function provides reliable signal handling semantics (as when calling
207 function provides unreliable semantics (as when calling
212 .IR "SA_RESETHAND | SA_NODEFER" ).
215 provides reliable semantics.
216 POSIX.1-2001 leaves these aspects of
223 In order to wait for a signal,
224 BSD and System V both provided a function named
226 but this function has a different argument on the two systems.
231 In versions of glibc before 2.2,
237 was specified as a value other than
240 In versions of glibc before 2.5,
242 does not correctly return the previous disposition of the signal
252 Instead, it should return the previous disposition of the signal
253 (unless the signal was blocked, in which case
256 Second, if the signal is currently blocked, then
257 the return value of a successful
261 Instead, the previous disposition of the signal is returned.
262 These problems have been fixed since glibc 2.5.
263 .\" See http://sourceware.org/bugzilla/show_bug.cgi?id=1951