1SIGACTION(2) System Calls Manual SIGACTION(2)
2
3
4
6 sigwait - wait for a signal
7
9 #include <signal.h>
10
11 int sigwait(set, sig)
12 sigset_t *set;
13 int *sig;
14
16 Sigwait checks for a pending signal in set, clears it from the set of
17 pending signals and returns the signal number in the location refer‐
18 enced by sig. If more than one of the signals contained in set is
19 pending then sigwait selects only one and acts upon it. If no signal
20 contained in set is pending, then sigwait waits for a signal to arrive.
21 All of the signals contained in set should be blocked or unpredictable
22 results may occur.
23
25 The sigwait function returns 0 if successful and the signal number is
26 stored in the location referenced by sig.
27
29 The sigwait function may return one of the following errors:
30
31 EINVAL The set argument contains an invalid or unsupported
32 signal number.
33
34 EFAULT Sig points to memory that is not a valid part of
35 the process address space.
36
38 sigprocmask(2)
39
41 The sigwait function call conforms to IEEE Std1003.1-1998 (``POSIX'').
42
43
44
454.4 Berkeley Distribution September 10, 1999 SIGACTION(2)