Skip to content

Commit

Permalink
kill timedout process
Browse files Browse the repository at this point in the history
  • Loading branch information
halaei committed Dec 11, 2016
1 parent afccec3 commit cd87eff
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Illuminate/Queue/Worker.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ protected function registerTimeoutHandler(WorkerOptions $options)
pcntl_async_signals(true);

pcntl_signal(SIGALRM, function () {
if (extension_loaded('posix')) {
posix_kill(getmypid(), SIGKILL);
}

exit(1);
});

Expand Down

0 comments on commit cd87eff

Please sign in to comment.