From 770d82bdd1c782e2aad2136b216a3a1a9ecd7cdf Mon Sep 17 00:00:00 2001
From: Stephen L Johnson <sjohnson@monsters.org>
Date: Wed, 1 Mar 2000 22:12:17 +0000
Subject: [PATCH] added code to clear the signal mask in case of inherited
 blocked signals

---
 src/spong-client.pl  | 8 +++++++-
 src/spong-network.pl | 6 ++++++
 2 files changed, 13 insertions(+), 1 deletion(-)

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.
 
-- 
2.30.2