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

NAME

6       sigwait - wait for a signal
7

SYNOPSIS

9       #include <signal.h>
10
11        int sigwait(const sigset_t *set, int *sig);
12
13   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
14
15       sigwait(): _POSIX_C_SOURCE >= 1 || _XOPEN_SOURCE || _POSIX_SOURCE
16

DESCRIPTION

18       The  sigwait()  function suspends execution of the calling thread until
19       the delivery of one of the signals specified in  the  signal  set  set.
20       The  function  accepts  the signal (removes it from the pending list of
21       signals), and returns the signal number in sig.
22
23       The operation of sigwait() is the same as sigwaitinfo(), except that:
24
25       * sigwait() only returns the signal number,  rather  than  a  siginfo_t
26         structure describing the signal.
27
28       * The return values of the two functions are different.
29

RETURN VALUE

31       On success, sigwait() returns 0.  On error, it returns a positive error
32       number.
33

ERRORS

35       EINVAL set contains an invalid signal number.
36

CONFORMING TO

38       POSIX.1-2001.
39

NOTES

41       sigwait() is implemented using sigtimedwait(2).
42

EXAMPLES

44       See pthread_sigmask(3).
45

SEE ALSO

47       sigaction(2),  signalfd(2),  sigpending(2),   sigsuspend(2),   sigwait‐
48       info(2), sigsetops(3), signal(7)
49

COLOPHON

51       This  page  is  part of release 3.22 of the Linux man-pages project.  A
52       description of the project, and information about reporting  bugs,  can
53       be found at http://www.kernel.org/doc/man-pages/.
54
55
56
57Linux                             2009-02-10                        SIGWAIT(3)
Impressum