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