1*61185Sbostic.\" Copyright (c) 1983, 1991, 1993 2*61185Sbostic.\" The Regents of the University of California. All rights reserved. 344870Skarels.\" 450487Scael.\" %sccs.include.redist.roff% 544870Skarels.\" 6*61185Sbostic.\" @(#)sigprocmask.2 8.1 (Berkeley) 06/04/93 744870Skarels.\" 847208Scael.Dd 947208Scael.Dt SIGPROCMASK 2 1050487Scael.Os 1147208Scael.Sh NAME 1247208Scael.Nm sigprocmask 1347208Scael.Nd manipulate current signal mask 1447208Scael.Sh SYNOPSIS 1547208Scael.Fd #include <signal.h> 1647208Scael.Ft int 1747208Scael.Fn sigprocmask "int how" "const sigset_t *set" "sigset_t *oset" 1847208Scael.Fn sigmask signum 1947208Scael.Sh DESCRIPTION 2044870SkarelsThe 2147208Scael.Fn sigprocmask 2247208Scaelfunction examines and/or changes the current signal mask (those signals 2344870Skarelsthat are blocked from delivery). 2444870SkarelsSignals are blocked if they are members of the current signal mask set. 2547208Scael.Pp 2644870SkarelsIf 2747208Scael.Fa set 2844870Skarelsis not null, the action of 2947208Scael.Fn sigprocmask 3044870Skarelsdepends on the value of the parameter 3147208Scael.Fa how . 3244870SkarelsThe signal mask is changed as a function of the specified 3347208Scael.Fa set 3444870Skarelsand the current mask. 3544870SkarelsThe function is specified by 3647208Scael.Fa how 3747208Scaelusing one of the following values from 3847208Scael.Aq Pa signal.h : 3947208Scael.Bl -tag -width SIG_UNBLOCK 4047208Scael.It Dv SIG_BLOCK 4144870SkarelsThe new mask is the union of the current mask and the specified 4247208Scael.Fa set . 4347208Scael.It Dv SIG_UNBLOCK 4444870SkarelsThe new mask is the intersection of the current mask 4544870Skarelsand the complement of the specified 4647208Scael.Fa set . 4747208Scael.It Dv SIG_SETMASK 4844870SkarelsThe current mask is replaced by the specified 4947208Scael.Fa set . 5047208Scael.El 5147208Scael.Pp 5244870SkarelsIf 5347208Scael.Fa oset 5447208Scaelis not null, it is set to 5544870Skarelsthe previous value of the signal mask. 5644870SkarelsWhen 5747208Scael.Fa set 5847208Scaelis null, 5947208Scaelthe value of 6047208Scael.Ar how 6147208Scaelis insignificant and the mask remains unset 6247208Scaelproviding a way to examine the signal mask without modification. 6347208Scael.Pp 6444870SkarelsThe system 6547208Scaelquietly disallows 6647208Scael.Dv SIGKILL 6747208Scaelor 6847208Scael.Dv SIGSTOP 6947208Scaelto be blocked. 7047208Scael.Sh RETURN VALUES 7147208ScaelA 0 value indicated that the call succeeded. A -1 return value 7244870Skarelsindicates an error occurred and 7347208Scael.Va errno 7444870Skarelsis set to indicated the reason. 7547208Scael.Sh ERRORS 7644870SkarelsThe 7747208Scael.Fn sigprocmask 7844870Skarelscall will fail and the signal mask will be unchanged if one 7944870Skarelsof the following occurs: 8047208Scael.Bl -tag -width Bq Er EINVAL 8147208Scael.It Bq Er EINVAL 8247208Scael.Fa how 8344870Skarelshas a value other than those listed here. 8447208Scael.Sh SEE ALSO 8547208Scael.Xr kill 2 , 8647208Scael.Xr sigaction 2 , 8747208Scael.Xr sigsetops 3 , 8847208Scael.Xr sigsuspend 2 8947208Scael.Sh STANDARDS 9047208ScaelThe 9150487Scael.Nm sigprocmask 9247208Scaelfunction call is expected to 9350487Scaelconform to 9450487Scael.St -p1003.1-88 . 95