]> Savannah Git Hosting - gnulib.git/commitdiff
doc: Add a note about sigprocmask vs. pthread_sigmask.
authorBruno Haible <bruno@clisp.org>
Sun, 28 Jun 2020 20:10:32 +0000 (22:10 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 28 Jun 2020 20:12:49 +0000 (22:12 +0200)
* doc/posix-functions/sigprocmask.texi: Add note.

ChangeLog
doc/posix-functions/sigprocmask.texi

index ce8dc4cfc24b13f4a200bb16cacbabf5814118d6..84a1bd47277e663a2691ca657aeb6e6794f34b4e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2020-06-28  Bruno Haible  <bruno@clisp.org>
+
+       doc: Add a note about sigprocmask vs. pthread_sigmask.
+       * doc/posix-functions/sigprocmask.texi: Add note.
+
 2020-06-28  Bruno Haible  <bruno@clisp.org>
 
        getrandom: Fix compilation errors on older versions of mingw.
index 20b5405e007c710fa610a259ca70633cbfd7dfcb..1a1379a21d3af61e4c39e6c5829703b0668bb443 100644 (file)
@@ -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.