ADC Home > Reference Library > Reference > Mac OS X > Mac OS X Man Pages

 

This document is a Mac OS X manual page. Manual pages are a command-line technology for providing documentation. You can view these manual pages locally using the man(1) command. These manual pages come from many different sources, and thus, have a variety of writing styles.

This manual page is associated with the Mac OS X developer tools. The software or headers described may not be present on your Mac OS X installation until you install the developer tools package. This package is available on your Mac OS X installation DVD, and the latest versions can be downloaded from developer.apple.com.

For more information about the manual page format, see the manual page for manpages(5).



SIGWAIT(2)                  BSD System Calls Manual                 SIGWAIT(2)

NAME
     sigwait -- select a set of signals

SYNOPSIS
     #include <signal.h>

     int
     sigwait(const sigset_t *restrict set, int *restrict sig);

DESCRIPTION
     The sigwait() function selects a set of signals, specified by set.  If none of the selected signals are
     pending, sigwait() waits until one or more of the selected signals has been generated.  Then sigwait()
     atomically clears one of the selected signals from the set of pending signals for the process and sets
     the location pointed to by sig to the signal number that was cleared.

     The signals specified by set should be blocked, but not ignored, at the time of the call to sigwait().

     Processes which call sigwait() on ignored signals will wait indefinitely.  Ignored signals are dropped
     immediately by the system, before delivery to a waiting process.

RETURN VALUES
     If successful, sigwait() returns 0 and sets the location pointed to by sig to the cleared signal num-ber. number.
     ber.  Otherwise, an error number is returned.

ERRORS
     sigwait() will fail if:

     [EINVAL]           set specifies one or more invalid signal numbers.

SEE ALSO
     pthread_sigmask(2), sigaction(2), sigpending(2), sigsuspend(2), pause(3)

STANDARDS
     sigwait() conforms to ISO/IEC 9945-1:1996 (``POSIX.1'')

BSD                             April 27, 2000                             BSD

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.