summaryrefslogtreecommitdiff
path: root/lib/libc_r/man/sigwait.3
diff options
context:
space:
mode:
authorDavid Leonard <d@cvs.openbsd.org>1998-08-27 09:01:31 +0000
committerDavid Leonard <d@cvs.openbsd.org>1998-08-27 09:01:31 +0000
commitbedf96e763621a9b6fb71822bd95c454b95d9486 (patch)
tree22181d26ad362f92835d7d276b5a84d2eb9b042e /lib/libc_r/man/sigwait.3
parent9f6a9b5b5b545cec5bad0c172212ede2256d4285 (diff)
experimental threaded libc - kernel only
Diffstat (limited to 'lib/libc_r/man/sigwait.3')
-rw-r--r--lib/libc_r/man/sigwait.376
1 files changed, 76 insertions, 0 deletions
diff --git a/lib/libc_r/man/sigwait.3 b/lib/libc_r/man/sigwait.3
new file mode 100644
index 00000000000..159ea408120
--- /dev/null
+++ b/lib/libc_r/man/sigwait.3
@@ -0,0 +1,76 @@
+.\" $OpenBSD: sigwait.3,v 1.1 1998/08/27 09:00:48 d Exp $
+.Dd August 20, 1998
+.Os Ox
+.Dt SIGWAIT 3
+.Sh NAME
+.Nm sigwait
+.Nd synchonously accept a signal
+.Sh SYNOPSIS
+.Fd #include <signal.h>
+.Ft int
+.Fn sigwait "sont sigset_t *set" "int *sig"
+.Sh DESCRIPTION
+The
+.Fn sigwait
+function selects a pending signal from
+.Fa set ,
+atomically clears it from the system's set of pending signals, and returns
+that signal number in the location referenced by
+.Fa sig .
+If prior to the call to
+.Fn sigwait
+there are multiple pending instances of a single signal number,
+it is undefined whether upon successful return there are any remaining pending signals for that signal number.
+If no signal in
+.Fa set
+is pending at the time of the call,
+the thread shall be suspended until one or more becomes pending.
+The signals defined by
+.Fa set
+should have been blocked at the time of the call to
+.Fn sigwait ;
+otherwise the behaviour is undefined.
+The effect of
+.Fn sigwait
+on the signal actions for the signals in
+.Fa set
+is unspecified.
+.Pp
+If more than one thread is using
+.Fn sigwait
+to wait for the same signal,
+no more than one of these threads shall return from
+.Fn sigwait
+with the signal number.
+Which thread returns from
+.Fn sigwait
+if more than a single thread is waiting is unspecified.
+.Sh RETURN VALUES
+Upon successful completion,
+.Fn sigwait
+stores the signal number of the recived signal at the location referenced by
+.Fa sig
+and returns zero.
+.Sh ERRORS
+On error,
+.Fn Sigwait
+returns one of these error values:
+.Bl -tag -width Er
+.It Bq Er EINVAL
+The
+.Fa set
+argument contains an invalid or unsupported signal number
+.El
+.Sh SEE ALSO
+.Xr pause
+.Xr sigaction
+.Xr sigpending
+.Xr sigsuspend
+.Xr pthreads
+.Xr pthread_sigmask
+.Sh STANDARDS
+.Fn sigwait
+conforms to ISO/IEC 9945-1 ANSI/IEEE
+.Pq Dq Tn POSIX
+Std 1003.1c/D10.
+.\" Std 1003.1 Second Edition 1996-07-12.