diff options
Diffstat (limited to 'lib/libc_r/man/pthread_sigmask.3')
-rw-r--r-- | lib/libc_r/man/pthread_sigmask.3 | 60 |
1 files changed, 49 insertions, 11 deletions
diff --git a/lib/libc_r/man/pthread_sigmask.3 b/lib/libc_r/man/pthread_sigmask.3 index e3bc625974f..41aaf7c8c61 100644 --- a/lib/libc_r/man/pthread_sigmask.3 +++ b/lib/libc_r/man/pthread_sigmask.3 @@ -1,10 +1,11 @@ -.\" $OpenBSD: pthread_sigmask.3,v 1.3 1999/07/07 10:50:05 aaron Exp $ +.\" $OpenBSD: pthread_sigmask.3,v 1.4 2002/02/21 20:12:19 fgsch Exp $ +.\" .Dd March 21, 1999 .Dt PTHREAD_SIGMASK 3 .Os .Sh NAME .Nm pthread_sigmask -.Nd manipulate the current thread's signal mask +.Nd examine and/or change a thread's signal mask .Sh SYNOPSIS .Fd #include <pthread.h> .Fd #include <signal.h> @@ -13,19 +14,56 @@ .Sh DESCRIPTION The .Fn pthread_sigmask -function is identical to -.Xr sigprocmask 2 , -except that it only affects the signal mask of the calling thread. +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 -The return values of +If successful, +.Fn pthread_sigmask +returns 0. +Otherwise, an error is returned. +.Sh ERRORS .Fn pthread_sigmask -are the same as -.Xr sigprocmask 2 . +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 sigsetops 3 , +.Xr sigsuspend 2 , .Xr pthreads 3 .Sh STANDARDS .Fn pthread_sigmask -conforms to ISO/IEC 9945-1 ANSI/IEEE -.Pq Dq Tn POSIX -Std 1003.1 Second Edition 1996-07-12. +conforms to +.St -p1003.1-96 . |