skalibs

Mirror/fork of https://skarnet.org/software/skalibs/
git clone https://ccx.te2000.cz/git/skalibs
Log | Files | Refs | README | LICENSE

commit dd6ebd3d063c1d3caa48cf14ae89d21aa5acf2c3
parent 5b4169f484ad2aac76c816503142067363b2c332
Author: Laurent Bercot <ska-skaware@skarnet.org>
Date:   Sat,  4 Apr 2020 12:52:31 +0000

 bugfix: sigprocmask invocation on non-signalfd systems

Diffstat:
MAUTHORS | 1+
Msrc/libstddjb/selfpipe_trap.c | 2+-
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/AUTHORS b/AUTHORS @@ -37,3 +37,4 @@ Thanks to: Casper Ti. Vector <caspervector@gmail.com> Guillermo <gdiazhartusch@gmail.com> Alex Raschi <raschi.alex@gmail.com> + Josuah Demangeon <me@josuah.net> diff --git a/src/libstddjb/selfpipe_trap.c b/src/libstddjb/selfpipe_trap.c @@ -38,7 +38,7 @@ int selfpipe_trap (int sig) { if (selfpipe_fd < 0) return (errno = EBADF, -1) ; if (sig_catcha(sig, &selfpipe_ssa) < 0) return -1 ; - if (sigprocmask(SIG_UNBLOCK, sig, 0) < 0 || sigaddset(&selfpipe_caught, sig) < 0) + if (sigaddset(&selfpipe_caught, sig) < 0 || sigprocmask(SIG_UNBLOCK, &selfpipe_caught, 0) < 0) { int e = errno ; sig_restore(sig) ;