1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
.\" $OpenBSD: pthread_sigmask.3,v 1.10 2013/06/05 03:44:50 tedu Exp $
.\"
.\"
.\" David Leonard, 1999. Public Domain.
.\"
.Dd $Mdocdate: June 5 2013 $
.Dt PTHREAD_SIGMASK 3
.Os
.Sh NAME
.Nm pthread_sigmask
.Nd examine and/or change a thread's signal mask
.Sh SYNOPSIS
.In signal.h
.Ft int
.Fn pthread_sigmask "int how" "const sigset_t *set" "sigset_t *oset"
.Sh DESCRIPTION
The
.Fn pthread_sigmask
function examines and/or changes the calling thread's signal mask.
.Pp
If
.Fa set
is not
.Dv NULL ,
it specifies a set of signals to be modified, and
.Fa how
specifies what to set the signal mask to:
.Bl -tag -width SIG_UNBLOCK
.It Dv SIG_BLOCK
Union of the current mask and
.Fa set .
.It Dv SIG_UNBLOCK
Intersection of the current mask and the complement of
.Fa set .
.It Dv SIG_SETMASK
.Fa set .
.El
.Pp
If
.Fa oset
is not NULL, the previous signal mask is stored in the location pointed to by
.Fa oset .
.Pp
.Dv SIGKILL
and
.Dv SIGSTOP
cannot be blocked, and will be silently ignored if included in the signal mask.
.Sh RETURN VALUES
If successful,
.Fn pthread_sigmask
returns 0.
Otherwise, an error is returned.
.Sh ERRORS
.Fn pthread_sigmask
will fail if:
.Bl -tag -width Er
.It Bq Er EINVAL
.Fa how
is not one of the defined values.
.El
.Sh SEE ALSO
.Xr sigaction 2 ,
.Xr sigpending 2 ,
.Xr sigprocmask 2 ,
.Xr sigsuspend 2 ,
.Xr pthreads 3 ,
.Xr sigsetops 3
.Sh STANDARDS
.Fn pthread_sigmask
conforms to
.St -p1003.1-96 .
|