BSD job control

BURNS,JIM gt0178a at prism.gatech.EDU
Sun Sep 2 09:46:24 AEST 1990


in article <323 at sherpa.UUCP>, rac at sherpa.UUCP (Roger Cornelius) says:
>                                         Can someone explain to me what
> the BSD function sigsetmask() does.

NAME
     sigsetmask - set current signal mask

SYNOPSIS
     sigsetmask(mask);
     int mask;

DESCRIPTION
     Sigsetmask sets the current signal mask (those signals which
     are blocked from delivery).  Signal i is blocked if the i-th
     bit in mask is a 1.

     The system quietly disallows SIGKILL, SIGSTOP, or SIGCONT to
     be blocked.

RETURN VALUE
     The previous set of masked signals is returned.

SEE ALSO
     kill(2), sigvec(2), sigblock(2), sigpause(2)

In other words, sigsetmask(2) allows you to disallow delivery of signals
in critical sections of code. Sigsetmask *sets* the signal mask. Similarly
sigblock(2) *adds* to the current signal mask. Signal 1 maps to bit 0
(right most) and signal 32 (if you go that high - see 'kill -l') maps to
bit 31 (left most). On systems w/16 bit ints, the parameter types would
probably be defined differently.
-- 
BURNS,JIM
Georgia Institute of Technology, Box 30178, Atlanta Georgia, 30332
uucp:	  ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gt0178a
Internet: gt0178a at prism.gatech.edu



More information about the Comp.unix.questions mailing list