Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sigwait(2) — SunOS 5.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sigaction(2)

sigpending(2)

sigprocmask(2)

sigsuspend(2)

thr_sigsetmask(3T)

signal(5)

sigwait(2)

NAME

sigwait − wait until a signal is posted

SYNOPSIS

#include <signal.h>

int sigwait(sigset_t ∗set);

DESCRIPTION

sigwait() selects a signal in set that is pending on the calling thread (see thr_create(3T)) or LWP.  If no signal in set is pending, then sigwait() blocks until a signal in set becomes pending.  The selected signal is cleared from the set of signals pending on the calling thread or LWP and the number of the signal is returned.  The selection of a signal in set is independent of the signal mask of the calling thread or LWP.  This means a thread or LWP can synchronously wait for signals that are being blocked by the signal mask of the calling thread or LWP. 

If more than one thread or LWP waits for the same signal, only one is unblocked when the signal arrives. 

RETURN VALUES

Upon successful completion, a signal number is returned.  Otherwise, a value of −1 is returned and errno is set to indicate error. 

ERRORS

If any of the following conditions are detected, sigwait() fails and returns the corresponding value:

EINVAL set contains an unsupported signal number. 

EFAULT set points to an invalid address. 

SEE ALSO

sigaction(2), sigpending(2), sigprocmask(2), sigsuspend(2), thr_sigsetmask(3T), signal(5). 

Sun Microsystems  —  Last change: 30 Jul 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026