diff options
Diffstat (limited to 'source3/nmbd')
-rw-r--r-- | source3/nmbd/asyncdns.c | 10 | ||||
-rw-r--r-- | source3/nmbd/nmbd.c | 16 |
2 files changed, 12 insertions, 14 deletions
diff --git a/source3/nmbd/asyncdns.c b/source3/nmbd/asyncdns.c index 3d2d5303de..89be2b0ce0 100644 --- a/source3/nmbd/asyncdns.c +++ b/source3/nmbd/asyncdns.c @@ -135,7 +135,7 @@ void start_async_dns(void) { int fd1[2], fd2[2]; - signal(SIGCLD, SIG_IGN); + CatchChild(); if (pipe(fd1) || pipe(fd2)) { return; @@ -154,10 +154,10 @@ void start_async_dns(void) fd_in = fd2[0]; fd_out = fd1[1]; - signal(SIGUSR2, SIG_IGN); - signal(SIGUSR1, SIG_IGN); - signal(SIGHUP, SIG_IGN); - signal(SIGTERM, SIGNAL_CAST sig_term ); + CatchSignal(SIGUSR2, SIG_IGN); + CatchSignal(SIGUSR1, SIG_IGN); + CatchSignal(SIGHUP, SIG_IGN); + CatchSignal(SIGTERM, SIGNAL_CAST sig_term ); asyncdns_process(); } diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c index 1bb7ed55e4..3fa749b883 100644 --- a/source3/nmbd/nmbd.c +++ b/source3/nmbd/nmbd.c @@ -102,9 +102,7 @@ static int sig_hup(void) set_samba_nb_type(); BlockSignals(False,SIGHUP); -#ifndef DONT_REINSTALL_SIG - signal(SIGHUP,SIGNAL_CAST sig_hup); -#endif + return(0); } /* sig_hup */ @@ -141,7 +139,7 @@ static BOOL dump_core(void) return( False ); umask( ~(0700) ); -#ifndef NO_GETRLIMIT +#ifdef HAVE_GETRLIMIT #ifdef RLIMIT_CORE { struct rlimit rlp; @@ -428,7 +426,7 @@ static BOOL open_sockets(BOOL isdaemon, int port) if ( ClientNMB == -1 ) return( False ); - signal( SIGPIPE, SIGNAL_CAST sig_pipe ); + CatchSignal( SIGPIPE, SIGNAL_CAST sig_pipe ); set_socket_options( ClientNMB, "SO_BROADCAST" ); set_socket_options( ClientDGRAM, "SO_BROADCAST" ); @@ -582,8 +580,8 @@ int main(int argc,char *argv[]) fault_setup((void (*)(void *))fault_continue ); - signal( SIGHUP, SIGNAL_CAST sig_hup ); - signal( SIGTERM, SIGNAL_CAST sig_term ); + CatchSignal( SIGHUP, SIGNAL_CAST sig_hup ); + CatchSignal( SIGTERM, SIGNAL_CAST sig_term ); /* Setup the signals that allow the debug log level to by dynamically changed. */ @@ -592,11 +590,11 @@ int main(int argc,char *argv[]) SIGUSR1 and SIGUSR2 to do debug level changes. */ #ifndef MEM_MAN #if defined(SIGUSR1) - signal( SIGUSR1, SIGNAL_CAST sig_usr1 ); + CatchSignal( SIGUSR1, SIGNAL_CAST sig_usr1 ); #endif /* SIGUSR1 */ #if defined(SIGUSR2) - signal( SIGUSR2, SIGNAL_CAST sig_usr2 ); + CatchSignal( SIGUSR2, SIGNAL_CAST sig_usr2 ); #endif /* SIGUSR2 */ #endif /* MEM_MAN */ |