Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Commit

Permalink
fall back to SIGKILL
Browse files Browse the repository at this point in the history
  • Loading branch information
fredemmott committed May 18, 2015
1 parent 6e207b2 commit 7bf2918
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions base/Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ public function stop(): void {
if ($pid !== null) {
posix_kill($pid, SIGTERM);
}
for ($i = 0; $this->isRunning() && $i < 8; ++$i) {
self::sleepSeconds(0.25);
}
if ($this->isRunning()) {
posix_kill($pid, SIGKILL);
}
}

protected function getPidFilePath(): ?string {
Expand Down

0 comments on commit 7bf2918

Please sign in to comment.