summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2020-04-04 12:52:31 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2020-04-04 12:52:31 +0000
commitdd6ebd3d063c1d3caa48cf14ae89d21aa5acf2c3 (patch)
tree25b7adf2ee60b0ae9c735678e201451355b794f6 /src
parent5b4169f484ad2aac76c816503142067363b2c332 (diff)
downloadskalibs-dd6ebd3d063c1d3caa48cf14ae89d21aa5acf2c3.tar.xz
bugfix: sigprocmask invocation on non-signalfd systems
Diffstat (limited to 'src')
-rw-r--r--src/libstddjb/selfpipe_trap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstddjb/selfpipe_trap.c b/src/libstddjb/selfpipe_trap.c
index 090d5ac..1dd4320 100644
--- 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) ;