]> 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)
committerOndřej Surý <ondrej@isc.org>
Thu, 29 Apr 2021 10:03:50 +0000 (12:03 +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.

bin/tests/system/start.pl

index 791e65d56c96fbda26e91a9b70a0a9f370d69188..89807d0cd0bd46413e30b10cc06a91a6d7eda3a7 100755 (executable)
@@ -210,7 +210,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 $srcdir/stop.pl $test";
                        exit 1;