From: Stephen L Johnson Date: Wed, 1 Mar 2000 22:12:17 +0000 (+0000) Subject: added code to clear the signal mask in case of inherited blocked signals X-Git-Tag: spong-2_7-alpha5~61 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=770d82bdd1c782e2aad2136b216a3a1a9ecd7cdf;p=spong.git added code to clear the signal mask in case of inherited blocked signals --- diff --git a/src/spong-client.pl b/src/spong-client.pl index e4fd188..f41c3c3 100755 --- a/src/spong-client.pl +++ b/src/spong-client.pl @@ -16,6 +16,7 @@ use lib '@@LIBDIR@@'; use Sys::Hostname; use Socket; +use POSIX; use Spong::Daemon; use Spong::Status qw(status); @@ -98,7 +99,12 @@ sub load_config_files { # signal the current running spong-server program. sub handle_signals { - + + # Clear out signal mask in case we inherit any blocked sigs + + my $sigset = POSIX::SigSet->new; + sigprocmask(SIG_SETMASK, $sigset ); + # Set up some signal handlers to handle our death gracefully, and also # listen for the HUP signal, and if we se that, we re-exec ourself. diff --git a/src/spong-network.pl b/src/spong-network.pl index 52ba2f9..a779901 100755 --- a/src/spong-network.pl +++ b/src/spong-network.pl @@ -25,6 +25,7 @@ $CRIT_WARN_LEVEL = 1; use Sys::Hostname; use Net::Ping; use Socket; +use POSIX; use Spong::Daemon; use Spong::Status qw(status); @@ -258,6 +259,11 @@ sub load_config_files { sub handle_signals { + # Clear out signal mask in case we inherit any blocked sigs + + my $sigset = POSIX::SigSet->new; + sigprocmask(SIG_SETMASK, $sigset ); + # Set up some signal handlers to handle our death gracefully, and also # listen for the HUP signal, and if we se that, we re-exec ourself.