sigprocmask ¶POSIX specification:
https://pubs.opengroup.org/onlinepubs/9799919799/functions/sigprocmask.html
Portability problems fixed by Gnulib:
Portability problems not fixed by Gnulib:
Note: Although sigprocmask officially has undefined behaviour in
multi-threaded programs, in practice it is essentially equivalent to
pthread_sigmask, with only a difference regarding the error
return convention. It’s simpler to use sigprocmask, since it does
not require linking with -lpthread on some platforms:
glibc, NetBSD, OpenBSD, AIX.
Note: While on POSIX platforms, sigprocmask is multithread-safe
and async-signal safe (cf. POSIX section “Signal Actions”
https://pubs.opengroup.org/onlinepubs/9799919799/functions/V2_chap02.html#tag_16_04_03),
the gnulib replacement on native Windows is only multithread-safe,
not async-signal safe.