Skip to content

Commit

Permalink
Fixed BackgroundProcess:wait type error when SIGKILL constant not ava…
Browse files Browse the repository at this point in the history
…ilable (non console)
  • Loading branch information
jamielsharief committed Feb 2, 2021
1 parent 2c9263c commit df80069
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Process/BackgroundProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,7 @@ public function hasTimedOut(): bool
*/
public function isRunning(): bool
{
$this->updateStatus();

return $this->status('running') ?: false;
return $this->status('running') === true;
}

/**
Expand Down Expand Up @@ -237,7 +235,7 @@ public function stop(): bool
if ($this->isRunning() && extension_loaded('posix')) {
$pid = proc_get_status($this->process)['pid'];

return posix_kill($pid, SIGKILL);
return posix_kill($pid, 9);
}

return false;
Expand Down

0 comments on commit df80069

Please sign in to comment.