Linux repositories inspector

rt_sigtimedwait(2)

Linux 2.4.19
2003-04-07

man-pages

Linux kernel and C library user-space interface documentation

NAME

rt_sigtimedwait - synchronously wait for queued signals

SYNOPSIS

long rt_sigtimedwait(const sigset_t *uthese, siginfo_t *uinfo, const struct timespec uts, size_t sigsetsize);

DESCRIPTION

rt_sigtimedwait() suspends execution of the calling process until one of the signals in uthese is delivered. (If one of the signals in uthese is already pending for the calling process, rt_sigtimedwait() will return immediately with information about that signal.)
rt_sigtimedwait() removes the delivered signal from the calling process’s list of pending signals and returns the signal number as its function result. If the uinfo argument is not NULL, then it returns a structure of type siginfo_t
The argument uts, enables an upper bound to be placed on the time for which the process is suspended. This argument is of the following type:
struct timespec {
    long    tv_sec;         /* seconds */
    long    tv_nsec;        /* nanoseconds */
}
If both fields of this structure are specified as 0, a poll is performed: rt_sigtimedwait() returns immediately, either with information about a signal that was pending for the caller, or with an error if none of the signals in uthese was pending.

RETURN VALUE

On success, rt_sigtimedwait() returns a signal number (i.e., a value greater than zero). On failure, returns one of the values from the ERRORS section below.

ERRORS

-EAGAIN
No signal in uthese was delivered within the uts period specified to sigtimedwait().
-EINVAL
uts or uthese was invalid.
-EFAULT
memory error.
-EAGAIN
The wait was interrupted by a signal handler and the timeout period has expired.
-EINTR The wait was interrupted by a signal handler. (This handler was for a signal other than one of those in set.)

CONFORMING TO

POSIX 1003.1-2001
⇧ Top