table of contents
other versions
- wheezy 3.44-1
- jessie 3.74-1
- jessie-backports 4.10-2~bpo8+1
- testing 4.10-2
- unstable 4.10-2
other sections
SIGWAITINFO(2) | Linux Programmer's Manual | SIGWAITINFO(2) |
NAME¶
sigwaitinfo, sigtimedwait - synchronously wait for queued signalsSYNOPSIS¶
#include <signal.h>int sigwaitinfo(const sigset_t *set, siginfo_t *info);int sigtimedwait(const sigset_t *set, siginfo_t *info, const struct timespec *timeout);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
DESCRIPTION¶
sigwaitinfo() suspends execution of the calling thread until one of the signals in set is pending (If one of the signals in set is already pending for the calling thread, sigwaitinfo() will return immediately.)struct timespec { long tv_sec; /* seconds */ long tv_nsec; /* nanoseconds */ }
RETURN VALUE¶
On success, both sigwaitinfo() and sigtimedwait() return a signal number (i.e., a value greater than zero). On failure both calls return -1, with errno set to indicate the error.ERRORS¶
- EAGAIN
- No signal in set was became pending within the timeout period specified to sigtimedwait().
- EINTR
- The wait was interrupted by a signal handler; see signal(7). (This handler was for a signal other than one of those in set.)
- EINVAL
- timeout was invalid.
CONFORMING TO¶
POSIX.1-2001.NOTES¶
In normal usage, the calling program blocks the signals in set via a prior call to sigprocmask(2) (so that the default disposition for these signals does not occur if they become pending between successive calls to sigwaitinfo() or sigtimedwait()) and does not establish handlers for these signals. In a multithreaded program, the signal should be blocked in all threads, in order to prevent the signal being treated according to its default disposition in a thread other than the one calling sigwaitinfo() or sigtimedwait()).SEE ALSO¶
kill(2), sigaction(2), signal(2), signalfd(2), sigpending(2), sigprocmask(2), sigqueue(3), sigsetops(3), sigwait(3), signal(7), time(7)COLOPHON¶
This page is part of release 3.44 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/.2012-07-21 | Linux |