From 75289b1498f8c8ffac9624ecc87a9761cbd3e93b Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 6 Feb 2018 17:55:18 +0000 Subject: [PATCH] kill(): fix bug when running with POSIX extension but without pcntl SIGKILL constant is defined by pcntl, not by posix. If pcntl is not compiled then bugs can occur when trying to kill() the server (such as during a crash). --- src/pocketmine/PocketMine.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pocketmine/PocketMine.php b/src/pocketmine/PocketMine.php index 69d37364e..da224e540 100644 --- a/src/pocketmine/PocketMine.php +++ b/src/pocketmine/PocketMine.php @@ -377,7 +377,7 @@ namespace pocketmine { case "linux": default: if(function_exists("posix_kill")){ - posix_kill($pid, SIGKILL); + posix_kill($pid, 9); //SIGKILL }else{ exec("kill -9 " . ((int) $pid) . " > /dev/null 2>&1"); }