]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Use SIGABRT instead of SIGKILL to produce cores on failed start
authorOndřej Surý <ondrej@isc.org>
Wed, 21 Apr 2021 13:39:14 +0000 (15:39 +0200)
committerMichal Nowak <mnowak@isc.org>
Tue, 4 May 2021 15:18:45 +0000 (17:18 +0200)
When the `named` would hang on startup it would be killed with SIGKILL
leaving us with no information about the state the process was in.
This commit changes the start.pl script to send SIGABRT instead, so we
can properly collect and process the coredump from the hung named
process.

(cherry picked from commit 861a236937268466f634392e6b300d349932fd96)

bin/tests/system/start.pl

index 9e3518585c8d31268d3067d8dfb376fb1d3e5c79..b2e72dd666e25fd86a95ad633374f3fcaeaa2c67 100755 (executable)
@@ -209,7 +209,7 @@ sub start_server {
                if (++$tries > 140) {
                        print "I:$test:Couldn't start server $command (pid=$child)\n";
                        print "I:$test:failed\n";
-                       system "kill -9 $child" if ("$child" ne "");
+                       kill "ABRT", $child if ("$child" ne "");
                        chdir "$testdir";
                        system "$PERL $topdir/stop.pl $test";
                        exit 1;