1sigsuspend(2)                    System Calls                    sigsuspend(2)
2
3
4

NAME

6       sigsuspend - install a signal mask and suspend caller until signal
7

SYNOPSIS

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

DESCRIPTION

15       The  sigsuspend()  function  replaces the caller's signal mask with the
16       set of signals pointed to by the set argument and  suspends the  caller
17       until  delivery  of a signal whose action is either to execute a signal
18       catching function or to terminate the  process.  If  the  set  argument
19       points  to  an invalid address, the behavior is undefined and errno may
20       be set to EFAULT.
21
22
23       If the action is  to  terminate  the  process,  sigsuspend()  does  not
24       return.   If  the action is to execute a signal catching function, sig‐
25       suspend() returns  after  the  signal  catching  function  returns.  On
26       return,  the signal mask is restored to the set that existed before the
27       call to sigsuspend().
28
29
30       It is not possible to block signals that cannot be  ignored  (see  sig‐
31       nal.h(3HEAD)). This restriction is silently imposed by the system.
32

RETURN VALUES

34       Since  sigsuspend() suspends the caller's execution indefinitely, there
35       is no successful completion return value. On failure, it returns −1 and
36       sets errno to indicate the error.
37

ERRORS

39       The sigsuspend() function will fail if:
40
41       EINTR    A  signal  was  caught  by the caller and control was returned
42                from the signal catching function.
43
44
45
46       The sigsuspend() function may fail if:
47
48       EFAULT    The set argument points to an illegal address.
49
50

ATTRIBUTES

52       See attributes(5) for descriptions of the following attributes:
53
54
55
56
57       ┌─────────────────────────────┬─────────────────────────────┐
58       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
59       ├─────────────────────────────┼─────────────────────────────┤
60       │Interface Stability          │Standard                     │
61       ├─────────────────────────────┼─────────────────────────────┤
62       │MT-Level                     │Async-Signal-Safe            │
63       └─────────────────────────────┴─────────────────────────────┘
64

SEE ALSO

66       sigaction(2), sigprocmask(2), sigwait(2), signal(3C),  signal.h(3HEAD),
67       sigsetops(3C), attributes(5)
68

NOTES

70       If  the  caller specifies more than one unblocked signal in the mask to
71       sigsuspend(), more than one signal might be processed before  the  call
72       to sigsuspend() returns.
73
74
75       While  the  caller is executing the signal handler that interrupted its
76       call to sigsuspend(), its signal mask is  the  one  passed  to  sigsus‐
77       pend(),  modified as usual by the signal mask specification in the sig‐
78       nal's  sigaction(2)  parameters.   The  caller's  signal  mask  is  not
79       restored  to  its  previous value until the caller returns from all the
80       signal handlers that interrupted sigsuspend().
81
82
83
84SunOS 5.11                        24 Jun 2001                    sigsuspend(2)
Impressum