From 5788bf3d81934f21ce9c602d623c9b31cf2bedc4 Mon Sep 17 00:00:00 2001 From: наб Date: Wed, 3 Apr 2024 17:06:45 +0200 Subject: sigwait.3: Note sigprocmask(2) requirement, explicitly link sigtimedwait(2)/NOTES MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This comes from a real user complaint. sigwait(3) is the most obvious of the family, and it doesn't mention any of the usage details. Most of these can be crosslinked, but not mentioning the sigprocmask(2) requirement is malice. Signed-off-by: Ahelenia Ziemiańska Signed-off-by: Alejandro Colomar --- man3/sigwait.3 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/man3/sigwait.3 b/man3/sigwait.3 index 226a97e6f..2c3330015 100644 --- a/man3/sigwait.3 +++ b/man3/sigwait.3 @@ -36,6 +36,9 @@ function suspends execution of the calling thread until one of the signals specified in the signal set .I set becomes pending. +For a signal to become pending, +it must first be blocked with +.BR sigprocmask (2). The function accepts the signal (removes it from the pending list of signals), and returns the signal number in @@ -81,7 +84,9 @@ T} Thread safety MT-Safe .SH VERSIONS .BR sigwait () is implemented using -.BR sigtimedwait (2). +.BR sigtimedwait (2); +consult its +.BR NOTES . .P The glibc implementation of .BR sigwait () -- cgit v1.2.3