1sigblock(3UCB)     SunOS/BSD Compatibility Library Functions    sigblock(3UCB)
2
3
4

NAME

6       sigblock, sigmask, sigpause, sigsetmask - block signals
7

SYNOPSIS

9       /usr/ucb/cc [ flag ... ] file ...
10       #include <signal.h>
11
12       int sigblock(mask)
13       int mask;
14
15
16       int sigmask(signum)
17       int signum;
18
19
20       int sigpause(mask)
21       int mask;
22
23
24       int sigsetmask(mask)
25       int mask;
26
27

DESCRIPTION

29       sigblock()  adds  the  signals  specified in mask to the set of signals
30       currently being blocked from delivery.   Signals  are  blocked  if  the
31       appropriate  bit  in mask is a 1; the macro sigmask is provided to con‐
32       struct the mask for a given signum.  sigblock()  returns  the  previous
33       mask. The previous mask may be restored using sigsetmask().
34
35
36       sigpause() assigns mask to the set of masked signals and then waits for
37       a signal to arrive; on return the set of masked  signals  is  restored.
38       mask  is  usually  0 to indicate that no signals are now to be blocked.
39       sigpause() always terminates by being  interrupted,  returning  −1  and
40       setting errno to EINTR.
41
42
43       sigsetmask()  sets  the  current  signal  mask  (those signals that are
44       blocked from delivery).  Signals are blocked if the  corresponding  bit
45       in mask is a 1; the macro sigmask is provided to construct the mask for
46       a given signum.
47
48
49       In normal usage, a signal is blocked using sigblock(). To begin a crit‐
50       ical  section,  variables  modified on the occurrence of the signal are
51       examined to determine that there is no work to be done, and the process
52       pauses awaiting work by using sigpause() with the mask returned by sig‐
53       block().
54
55
56       It is not  possible  to  block  SIGKILL,  SIGSTOP,  or   SIGCONT,  this
57       restriction is silently imposed by the system.
58

RETURN VALUES

60       sigblock()  and sigsetmask() return the previous set of masked signals.
61       sigpause() returns −1 and sets errno to EINTR.
62

SEE ALSO

64       kill(2), sigaction(2), signal(3UCB), sigvec(3UCB)
65

NOTES

67       Use of these interfaces should be restricted to only applications writ‐
68       ten  on  BSD platforms.  Use of these interfaces with any of the system
69       libraries or in multi-thread applications is unsupported.
70
71
72
73SunOS 5.11                        30 Oct 2007                   sigblock(3UCB)
Impressum