TUX: Penguin Power!
Linux| Perl| PHP| Webserv| Databases| Sysadmin| Programming| Filesystems| Java| Webprog

Make Tux happy: Link to us!


SYNOPSIS
       #include <signal.h>

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


DESCRIPTION
       The  sigwait()  function shall select a pending signal from set, atomi-
       cally clear it from the system's set of  pending  signals,  and  return
       that  signal  number in the location referenced by sig. If prior to the
       call to sigwait() there are multiple pending instances of a single sig-
       nal number, it is implementation-defined whether upon successful return
       there are any remaining pending signals for that signal  number.     If
       the  implementation supports queued signals and there are multiple sig-
       nals queued for the signal number selected, the first such queued  sig-
       nal  shall cause a return from sigwait() and the remainder shall remain
       queued.  If no signal in set is pending at the time of  the  call,  the
       thread  shall  be suspended until one or more becomes pending. The sig-
       nals defined by set shall have been blocked at the time of the call  to
       sigwait();  otherwise,  the  behavior  is undefined. The effect of sig-
       wait() on the signal actions for the signals in set is unspecified.

       If more than one thread is using sigwait() to wait for the same signal,
       no  more than one of these threads shall return from sigwait() with the
       signal number. Which thread returns from sigwait() if more than a  sin-
       gle thread is waiting is unspecified.

       Should  any  of  the  multiple pending signals in the range SIGRTMIN to
       SIGRTMAX be selected, it shall be the lowest numbered one.  The  selec-
       tion order between realtime and non-realtime signals, or between multi-
       ple pending non-realtime signals, is unspecified.

RETURN VALUE
       Upon successful completion, sigwait() shall store the signal number  of
       the  received signal at the location referenced by sig and return zero.
       Otherwise, an error number shall be returned to indicate the error.

ERRORS
       The sigwait() function may fail if:

       EINVAL The set argument contains an invalid or unsupported signal  num-
              ber.


       The following sections are informative.

EXAMPLES
       None.

APPLICATION USAGE
       None.

RATIONALE
       the  signal.  Alternatively, if the implementation provides semaphores,
       they also can be used, either following sigwait() or from within a sig-
       nal handling routine previously registered with sigaction().

FUTURE DIRECTIONS
       None.

SEE ALSO
       Signal  Concepts  ,  Realtime  Signals  , pause() , pthread_sigmask() ,
       sigaction() , sigpending() , sigsuspend() , sigwaitinfo()  ,  the  Base
       Definitions volume of IEEE Std 1003.1-2001, <signal.h>, <time.h>

COPYRIGHT
       Portions  of  this text are reprinted and reproduced in electronic form
       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
       event of any discrepancy between this version and the original IEEE and
       The  Open Group Standard, the original IEEE and The Open Group Standard
       is the referee document. The original Standard can be  obtained  online
       at http://www.opengroup.org/unix/online.html .



Find all the song lyrics here: Lyrics Now!