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

SEE ALSO


kill(2), sigaction(2), signal(2), sigpending(2), sigprocmask(2), sigqueue(2), signal(7), sigsetops(3), sigtimedwait(2) Manual - Section 2: rt_sigtimedwait

Linked manpage for rt_sigtimedwait


This manual page is linked to the man page for man2/sigtimedwait.2.

Your browser will be automatically redirected to that page in
seconds.

You can also access it through the following URL:

../man2/sigtimedwait.htm.

 

openSUSE Logo

Contents