1SIGSUSPEND(2)              Linux Programmer's Manual             SIGSUSPEND(2)
2
3
4

NAME

6       sigsuspend - wait for a signal
7

SYNOPSIS

9       #include <signal.h>
10
11       int sigsuspend(const sigset_t *mask);
12

DESCRIPTION

14       sigsuspend()  temporarily  replaces  the  signal  mask  of  the calling
15       process with the mask given by mask and then suspends the process until
16       delivery  of  a signal whose action is to invoke a signal handler or to
17       terminate a process.
18
19       If the signal  terminates  the  process,  then  sigsuspend()  does  not
20       return.   If  the signal is caught, then sigsuspend() returns after the
21       signal handler returns, and the signal mask is restored  to  the  state
22       before the call to sigsuspend().
23
24       It  is  not possible to block SIGKILL or SIGSTOP; specifying these sig‐
25       nals in mask, has no effect on the process's signal mask.
26

RETURN VALUE

28       sigsuspend() always returns -1, normally with the error EINTR.
29

ERRORS

31       EFAULT mask points to memory which is not a valid part of  the  process
32              address space.
33
34       EINTR  The call was interrupted by a signal.
35

NOTES

37       Normally,  sigsuspend()  is  used  in conjunction with sigprocmask() in
38       order to prevent delivery of a signal during the execution of a  criti‐
39       cal  code  section.   The caller first blocks the signals with sigproc‐
40       mask().  When the critical code has completed, the  caller  then  waits
41       for  the  signals by calling sigsuspend() with the signal mask that was
42       returned by sigprocmask() (in the oldset argument).
43
44       See sigsetops(3) for details on manipulating signal sets.
45

CONFORMING TO

47       POSIX.1-2001.
48

SEE ALSO

50       kill(2), pause(2), sigaction(2),  signal(2),  sigprocmask(2),  sigwait‐
51       info(2), sigsetops(3), signal(7)
52
53
54
55Linux 2.6.13                      2005-09-15                     SIGSUSPEND(2)
Impressum