*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->OpenBSD man pages -> sigwait (3)              



NAME    [Toc]    [Back]

     sigwait - synchronously accept a signal

SYNOPSIS    [Toc]    [Back]

     #include <signal.h>

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

DESCRIPTION    [Toc]    [Back]

     The sigwait() function selects a pending  signal  from  set,
     clears  it from the system's set of pending signals, and returns that signal
 number in the location referenced by sig.  If  prior  to
the call to
     sigwait()  there  are multiple pending instances of a single
signal number,
     it is undefined whether upon successful return there are any
     pending signals for that signal number.  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  signals  defined by set should have
been blocked at
     the time of the call to sigwait(); otherwise  the  behaviour
is undefined.
     The  effect  of sigwait() on the signal actions for the signals in set is

     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 single
     thread is waiting is unspecified.

     Note: Code using the sigwait() function must be compiled and
linked with
     the -pthread option to gcc(1).

RETURN VALUES    [Toc]    [Back]

     Upon successful completion, sigwait() stores the signal number of the received
  signal at the location referenced by sig and returns

ERRORS    [Toc]    [Back]

     On error, sigwait() returns one of these error values:

     [EINVAL]      The set argument contains an invalid or unsupported signal

SEE ALSO    [Toc]    [Back]

     sigaction(2),    sigpending(2),   sigsuspend(2),   pause(3),

STANDARDS    [Toc]    [Back]

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

OpenBSD     3.6                         August      20,      1998
[ Back ]
 Similar pages
Name OS Title
XmRedisplayWidget HP-UX Synchronously activates the expose method of a widget to draw its content
pxfsigaddset IRIX Adds an individual signal to the specified signal set
pxfsigdelset IRIX Deletes an individual signal in the specified signal set
pxfsigismember IRIX Determines if the specified signal is a member of the specified signal set
BIO_get_accept_port Tru64 Accept BIO
BIO_do_accept Tru64 Accept BIO
BIO_get_bind_mode Tru64 Accept BIO
BIO_set_accept_bios Tru64 Accept BIO
BIO_s_accept NetBSD accept BIO
BIO_s_accept Tru64 Accept BIO
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service