Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!rutgers!mephisto!prism!gt0178a From: gt0178a@prism.gatech.EDU (BURNS,JIM) Newsgroups: comp.unix.questions Subject: Re: BSD job control Message-ID: <13268@hydra.gatech.EDU> Date: 1 Sep 90 23:46:24 GMT References: <323@sherpa.UUCP> Organization: Georgia Institute of Technology Lines: 36 in article <323@sherpa.UUCP>, rac@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@prism.gatech.edu