File smokeping-2.8.2-reload.patch of Package smokeping

This patch silences some noise for the logs and also allows for loading/reloading
config file changes without doing a whole service stop/start

--- ./lib/Smokeping.pm	2021-08-13 02:19:27.000000000 -0400
+++ ./lib/Smokeping.pm.new	2022-08-09 01:02:38.173644513 -0400
@@ -4029,7 +4029,7 @@
     }
     print "Warning: no logging method specified. Messages will be lost.\n"
         unless $logging;
-    print "Daemonizing $0 ...\n";
+    #print "Daemonizing $0 ...\n";
     defined (my $pid = fork) or die "Can't fork: $!";
     if ($pid) {
         exit;
@@ -4089,7 +4089,7 @@
                 die "missing facility?" unless defined $fac;
                 $syslog_facility = $fac if defined $fac;
                 $syslog_priority = $pri if defined $pri;
-                print "Note: logging to syslog as $syslog_facility/$syslog_priority.\n";
+                #print "Note: logging to syslog as $syslog_facility/$syslog_priority.\n";
                 openlog(basename($0), 'pid', $syslog_facility);
                 eval {
                         syslog($syslog_priority, 'Starting syslog logging');
@@ -4726,10 +4726,11 @@
                         $i++;
                         my %termsent;
                         for (keys %probepids) {
+                                next if not defined($probepids{$_}); # may be already removed by SIGCHLD handler
                                 my $step = $oldprobes->{$probepids{$_}}->step;
                                 if ($i > $step) {
                                         do_log("Child process $_ took over its step value to terminate, killing it with SIGTERM");
-                                        if (kill SIGTERM, $_ == 0 and exists $probepids{$_}) {
+                                        if (kill(SIGTERM, $_) == 0 and exists $probepids{$_}) {
                                                 do_log("Fatal: Child process $_ has disappeared? This shouldn't happen. Giving up.");
                                                 exit 1;
                                         } else {
openSUSE Build Service is sponsored by