diff options
| author | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2026-04-25 19:54:44 -0400 |
|---|---|---|
| committer | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2026-04-25 19:54:44 -0400 |
| commit | a9157ce950dfe2fc30795d43b9d79b9d1bffc48b (patch) | |
| tree | 9df484304b560466d145e662c1c254ff0e9ae0ba /static/openbsd/man3/sigwait.3 | |
| parent | 160aa82b2d39c46ad33723d7d909cb4972efbb03 (diff) | |
docs: Added All OpenBSD Manuals
Diffstat (limited to 'static/openbsd/man3/sigwait.3')
| -rw-r--r-- | static/openbsd/man3/sigwait.3 | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/static/openbsd/man3/sigwait.3 b/static/openbsd/man3/sigwait.3 new file mode 100644 index 00000000..17ad5610 --- /dev/null +++ b/static/openbsd/man3/sigwait.3 @@ -0,0 +1,76 @@ +.\" $OpenBSD: sigwait.3,v 1.2 2019/01/13 16:16:43 jca Exp $ +.\" +.\" David Leonard <d@openbsd.org>, 1998. Public domain. +.Dd $Mdocdate: January 13 2019 $ +.Dt SIGWAIT 3 +.Os +.Sh NAME +.Nm sigwait +.Nd synchronously accept a signal +.Sh SYNOPSIS +.In signal.h +.Ft int +.Fn sigwait "const 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 received 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 sigaction 2 , +.Xr sigpending 2 , +.Xr sigsuspend 2 , +.Xr pause 3 , +.Xr pthread_sigmask 3 +.Sh STANDARDS +.Fn sigwait +conforms to +.St -p1003.1-96 . |
