diff options
author | Andrew Tridgell <tridge@samba.org> | 1996-08-15 15:11:34 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1996-08-15 15:11:34 +0000 |
commit | c94866e9e44ea1eb72da06bc65ef1c032ae8e0c9 (patch) | |
tree | 8059b5df23098af3f9529ffcf7539c4d536e3778 /source/lib/util.c | |
parent | e37a624cf93885a5b0e77d5ab41d4a5a0bffe668 (diff) | |
download | samba-c94866e9e44ea1eb72da06bc65ef1c032ae8e0c9.tar.gz |
- added FAST_SHARE_MODES code
- added some named pipe code from Jim
Diffstat (limited to 'source/lib/util.c')
-rw-r--r-- | source/lib/util.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/source/lib/util.c b/source/lib/util.c index 413f1c648e0..5b765e0ac6f 100644 --- a/source/lib/util.c +++ b/source/lib/util.c @@ -3118,16 +3118,20 @@ char *gidtoname(int gid) /******************************************************************* block sigs ********************************************************************/ -void BlockSignals(BOOL block) +void BlockSignals(BOOL block,int signum) { #ifdef USE_SIGBLOCK - int block_mask = (sigmask(SIGTERM)|sigmask(SIGQUIT)|sigmask(SIGSEGV) - |sigmask(SIGCHLD)|sigmask(SIGQUIT)|sigmask(SIGBUS)| - sigmask(SIGINT)); + int block_mask = sigmask(signum); + static int oldmask = 0; if (block) - sigblock(block_mask); + oldmask = sigblock(block_mask); else - sigsetmask(0); + sigsetmask(oldmask); +#elif defined(USE_SIGPROCMASK) + sigset_t set; + sigemptyset(&set); + sigaddset(&set,signum); + sigprocmask(block?SIG_BLOCK:SIG_UNBLOCK,&set,NULL); #endif } |