Skip to content

Commit

Permalink
Try shutdown normally in healthcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
xtrime-ru committed Aug 24, 2022
1 parent c6d2bed commit c292edc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Server/HealthCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ public static function start(int $parentPid): void
Logger::getInstance()->critical('Health check failed');
if (self::isProcessAlive($parentPid)) {
Logger::getInstance()->critical('Killing parent process');
exec("kill -9 $parentPid");

exec("kill SIGINT $parentPid");
if (self::isProcessAlive($parentPid)) {
exec("kill SIGKILL $parentPid");
}
}
}

Expand Down

0 comments on commit c292edc

Please sign in to comment.