summaryrefslogtreecommitdiff
path: root/src/libstddjb/selfpipe_trap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstddjb/selfpipe_trap.c')
-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 f07db64..090d5ac 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 (sigaddset(&selfpipe_caught, sig) < 0)
+ if (sigprocmask(SIG_UNBLOCK, sig, 0) < 0 || sigaddset(&selfpipe_caught, sig) < 0)
{
int e = errno ;
sig_restore(sig) ;