1 .\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
2 .TH "PTHREAD_SIGMASK" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
5 pthread_sigmask, sigprocmask \- examine and change blocked signals
13 \fBint pthread_sigmask(int\fP \fIhow\fP\fB, const sigset_t *restrict\fP
16 \ \ \ \ \ \ sigset_t *restrict\fP \fIoset\fP\fB);
20 \fBint sigprocmask(int\fP \fIhow\fP\fB, const sigset_t *restrict\fP
23 \ \ \ \ \ \ sigset_t *restrict\fP \fIoset\fP\fB); \fP
29 The \fIpthread_sigmask\fP() function shall examine or change (or both)
30 the calling thread's signal mask, regardless of the number
31 of threads in the process. The function shall be equivalent to \fIsigprocmask\fP(),
32 without the restriction that the call be made
33 in a single-threaded process.
35 In a single-threaded process, the \fIsigprocmask\fP() function shall
36 examine or change (or both) the signal mask of the calling
39 If the argument \fIset\fP is not a null pointer, it points to a set
40 of signals to be used to change the currently blocked
43 The argument \fIhow\fP indicates the way in which the set is changed,
44 and the application shall ensure it consists of one of
48 The resulting set shall be the union of the current set and the signal
49 set pointed to by \fIset\fP.
52 The resulting set shall be the signal set pointed to by \fIset\fP.
55 The resulting set shall be the intersection of the current set and
56 the complement of the signal set pointed to by
60 If the argument \fIoset\fP is not a null pointer, the previous mask
61 shall be stored in the location pointed to by \fIoset\fP.
62 If \fIset\fP is a null pointer, the value of the argument \fIhow\fP
63 is not significant and the process' signal mask shall be
64 unchanged; thus the call can be used to enquire about currently blocked
67 If there are any pending unblocked signals after the call to \fIsigprocmask\fP(),
68 at least one of those signals shall be
69 delivered before the call to \fIsigprocmask\fP() returns.
71 It is not possible to block those signals which cannot be ignored.
72 This shall be enforced by the system without causing an error
75 If any of the SIGFPE, SIGILL, SIGSEGV, or SIGBUS signals are generated
76 while they are blocked, the result is undefined, unless
77 the signal was generated by the \fIkill\fP() function, the \fIsigqueue\fP()
78 function, or the \fIraise\fP()
81 If \fIsigprocmask\fP() fails, the thread's signal mask shall not be
84 The use of the \fIsigprocmask\fP() function is unspecified in a multi-threaded
88 Upon successful completion \fIpthread_sigmask\fP() shall return 0;
89 otherwise, it shall return the corresponding error number.
91 Upon successful completion, \fIsigprocmask\fP() shall return 0; otherwise,
92 -1 shall be returned, \fIerrno\fP shall be set to
93 indicate the error, and the process' signal mask shall be unchanged.
96 The \fIpthread_sigmask\fP() and \fIsigprocmask\fP() functions
100 The value of the \fIhow\fP argument is not equal to one of the defined
104 The \fIpthread_sigmask\fP() function shall not return an error code
107 \fIThe following sections are informative.\fP
111 .SH APPLICATION USAGE
116 When a process' signal mask is changed in a signal-catching function
117 that is installed by \fIsigaction\fP(), the restoration of the signal
118 mask on return from the signal-catching
119 function overrides that change (see \fIsigaction\fP()). If the signal-catching
121 was installed with \fIsignal\fP(), it is unspecified whether this
124 See \fIkill\fP() for a discussion of the requirement on delivery of
126 .SH FUTURE DIRECTIONS
131 \fIsigaction\fP() , \fIsigaddset\fP() , \fIsigdelset\fP() , \fIsigemptyset\fP()
132 , \fIsigfillset\fP() , \fIsigismember\fP() , \fIsigpending\fP() ,
133 \fIsigqueue\fP() , \fIsigsuspend\fP() , the Base Definitions volume
134 of IEEE\ Std\ 1003.1-2001, \fI<signal.h>\fP
136 Portions of this text are reprinted and reproduced in electronic form
137 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
138 -- Portable Operating System Interface (POSIX), The Open Group Base
139 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
140 Electrical and Electronics Engineers, Inc and The Open Group. In the
141 event of any discrepancy between this version and the original IEEE and
142 The Open Group Standard, the original IEEE and The Open Group Standard
143 is the referee document. The original Standard can be obtained online at
144 http://www.opengroup.org/unix/online.html .