summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/signal.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source3/lib/signal.c b/source3/lib/signal.c
index 5651e942d7..9c78fad886 100644
--- a/source3/lib/signal.c
+++ b/source3/lib/signal.c
@@ -75,12 +75,10 @@ void BlockSignals(BOOL block,int signum)
sigaddset(&set,signum);
sigprocmask(block?SIG_BLOCK:SIG_UNBLOCK,&set,NULL);
#elif defined(HAVE_SIGBLOCK)
- int block_mask = sigmask(signum);
- static int oldmask = 0;
if (block) {
- oldmask = sigblock(block_mask);
+ sigblock(sigmask(signum));
} else {
- sigsetmask(oldmask);
+ sigsetmask(siggetmask() & ~sigmask(signum));
}
#else
/* yikes! This platform can't block signals? */