diff options
Diffstat (limited to 'source/lib/signal.c')
-rw-r--r-- | source/lib/signal.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/source/lib/signal.c b/source/lib/signal.c index dceb3b53bce..9c78fad8862 100644 --- a/source/lib/signal.c +++ b/source/lib/signal.c @@ -1,5 +1,6 @@ /* - Unix SMB/CIFS implementation. + Unix SMB/Netbios implementation. + Version 1.9. signal handling functions Copyright (C) Andrew Tridgell 1998 @@ -96,11 +97,10 @@ void BlockSignals(BOOL block,int signum) 2) The signal should be blocked during handler execution. ********************************************************************/ -void (*CatchSignal(int signum,void (*handler)(int )))(int) +void CatchSignal(int signum,void (*handler)(int )) { #ifdef HAVE_SIGACTION struct sigaction act; - struct sigaction oldact; ZERO_STRUCT(act); @@ -114,11 +114,10 @@ void (*CatchSignal(int signum,void (*handler)(int )))(int) #endif sigemptyset(&act.sa_mask); sigaddset(&act.sa_mask,signum); - sigaction(signum,&act,&oldact); - return oldact.sa_handler; + sigaction(signum,&act,NULL); #else /* !HAVE_SIGACTION */ /* FIXME: need to handle sigvec and systems with broken signal() */ - return signal(signum, handler); + signal(signum, handler); #endif } |