1*b203dfbcSderaadt.\" $OpenBSD: pthread_sigmask.3,v 1.11 2017/05/29 09:40:02 deraadt Exp $ 2084a1742Sjmc.\" 3084a1742Sjmc.\" 4084a1742Sjmc.\" David Leonard, 1999. Public Domain. 582d2d131Sfgsch.\" 6*b203dfbcSderaadt.Dd $Mdocdate: May 29 2017 $ 70dce2936Sd.Dt PTHREAD_SIGMASK 3 87f3168a2Saaron.Os 90dce2936Sd.Sh NAME 100dce2936Sd.Nm pthread_sigmask 1182d2d131Sfgsch.Nd examine and/or change a thread's signal mask 120dce2936Sd.Sh SYNOPSIS 1386f9d4cdStedu.In signal.h 140dce2936Sd.Ft int 150dce2936Sd.Fn pthread_sigmask "int how" "const sigset_t *set" "sigset_t *oset" 160dce2936Sd.Sh DESCRIPTION 170dce2936SdThe 180dce2936Sd.Fn pthread_sigmask 1982d2d131Sfgschfunction examines and/or changes the calling thread's signal mask. 2082d2d131Sfgsch.Pp 2182d2d131SfgschIf 2282d2d131Sfgsch.Fa set 2382d2d131Sfgschis not 2482d2d131Sfgsch.Dv NULL , 2582d2d131Sfgschit specifies a set of signals to be modified, and 2682d2d131Sfgsch.Fa how 2782d2d131Sfgschspecifies what to set the signal mask to: 2882d2d131Sfgsch.Bl -tag -width SIG_UNBLOCK 2982d2d131Sfgsch.It Dv SIG_BLOCK 3082d2d131SfgschUnion of the current mask and 3182d2d131Sfgsch.Fa set . 3282d2d131Sfgsch.It Dv SIG_UNBLOCK 3382d2d131SfgschIntersection of the current mask and the complement of 3482d2d131Sfgsch.Fa set . 3582d2d131Sfgsch.It Dv SIG_SETMASK 3682d2d131Sfgsch.Fa set . 3782d2d131Sfgsch.El 3882d2d131Sfgsch.Pp 3982d2d131SfgschIf 4082d2d131Sfgsch.Fa oset 4182d2d131Sfgschis not NULL, the previous signal mask is stored in the location pointed to by 4282d2d131Sfgsch.Fa oset . 4382d2d131Sfgsch.Pp 4482d2d131Sfgsch.Dv SIGKILL 4582d2d131Sfgschand 4682d2d131Sfgsch.Dv SIGSTOP 4782d2d131Sfgschcannot be blocked, and will be silently ignored if included in the signal mask. 480dce2936Sd.Sh RETURN VALUES 4982d2d131SfgschIf successful, 500dce2936Sd.Fn pthread_sigmask 5182d2d131Sfgschreturns 0. 5282d2d131SfgschOtherwise, an error is returned. 5382d2d131Sfgsch.Sh ERRORS 5482d2d131Sfgsch.Fn pthread_sigmask 5582d2d131Sfgschwill fail if: 5682d2d131Sfgsch.Bl -tag -width Er 5782d2d131Sfgsch.It Bq Er EINVAL 5882d2d131Sfgsch.Fa how 5982d2d131Sfgschis not one of the defined values. 6082d2d131Sfgsch.El 610dce2936Sd.Sh SEE ALSO 6282d2d131Sfgsch.Xr sigaction 2 , 6382d2d131Sfgsch.Xr sigpending 2 , 64350bb3b8Salex.Xr sigprocmask 2 , 6582d2d131Sfgsch.Xr sigsuspend 2 , 6679ad192cSjmc.Xr pthreads 3 , 67*b203dfbcSderaadt.Xr sigaddset 3 680dce2936Sd.Sh STANDARDS 690dce2936Sd.Fn pthread_sigmask 7082d2d131Sfgschconforms to 7182d2d131Sfgsch.St -p1003.1-96 . 72