summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-06-12 06:09:39 +0000
committerAndrew Tridgell <tridge@samba.org>2000-06-12 06:09:39 +0000
commit6de513cef43ad83ecd1823bde5a4e05c22224b0f (patch)
tree742f9ec2f1ab587e4b8f28744eb1baca273af5cf /source3
parent2b37fd8435fa2ee20395e028d0371a0eca7785ff (diff)
downloadsamba-6de513cef43ad83ecd1823bde5a4e05c22224b0f.tar.gz
samba-6de513cef43ad83ecd1823bde5a4e05c22224b0f.tar.bz2
samba-6de513cef43ad83ecd1823bde5a4e05c22224b0f.zip
fixed a bug in BlockSignals() for systems that don't have
sigprocmask() (This used to be commit abf06fa90ba49f6a1ec5458d056f8b8cf20b6512)
Diffstat (limited to 'source3')
-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? */