Let me add a note, that explains why in Gnulib we continue to use sigprocmask()
in many places.


2020-06-28  Bruno Haible  <br...@clisp.org>

        doc: Add a note about sigprocmask vs. pthread_sigmask.
        * doc/posix-functions/sigprocmask.texi: Add note.

diff --git a/doc/posix-functions/sigprocmask.texi 
b/doc/posix-functions/sigprocmask.texi
index 20b5405..9b8cae4 100644
--- a/doc/posix-functions/sigprocmask.texi
+++ b/doc/posix-functions/sigprocmask.texi
@@ -16,3 +16,10 @@ mingw, MSVC 14.
 Portability problems not fixed by Gnulib:
 @itemize
 @end itemize
+
+Note: Although @code{sigprocmask} officially has undefined behaviour in
+multi-threaded programs, in practice it is essentially equivalent to
+@code{pthread_sigmask}, with only a difference regarding the error
+return convention.  It's simpler to use @code{sigprocmask}, since it does
+not require linking with @code{-lpthread} on some platforms:
+glibc, NetBSD, OpenBSD, AIX, IRIX.


Reply via email to