Skip to content

Commit

Permalink
Implement sigkill signal
Browse files Browse the repository at this point in the history
  • Loading branch information
Marick van Tuil authored and Marick van Tuil committed Dec 25, 2024
1 parent 828880c commit 586c428
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Worker.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ public function kill($status = 0, $options = null): void
// So, to still test that the application has exited, we will simply rely on the
// WorkerStopped event that is fired when the worker is stopped.
if (! app()->runningUnitTests()) {
if (extension_loaded('posix') && extension_loaded('pcntl')) {
posix_kill(getmypid(), SIGKILL);
}

exit($status);
}

Expand Down

0 comments on commit 586c428

Please sign in to comment.