mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-06 11:57:10 +00:00
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).
This commit is contained in:
parent
4eea54780a
commit
75289b1498
@ -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");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user