[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
doc: add a note about sigprocmask vs. pthread_sigmask
From: |
Bruno Haible |
Subject: |
doc: add a note about sigprocmask vs. pthread_sigmask |
Date: |
Sun, 28 Jun 2020 22:13:14 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-179-generic; KDE/5.18.0; x86_64; ; ) |
Let me add a note, that explains why in Gnulib we continue to use sigprocmask()
in many places.
2020-06-28 Bruno Haible <bruno@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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- doc: add a note about sigprocmask vs. pthread_sigmask,
Bruno Haible <=