Skip to content

Commit

Permalink
return after handling php 8.1.22/8.2.9
Browse files Browse the repository at this point in the history
  • Loading branch information
matthi4s committed Aug 17, 2023
1 parent c24fa4f commit 1a4bb21
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Pool.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,15 +307,16 @@ protected function registerListener()

pcntl_signal(SIGCHLD, function ($signo, $status) {
/**
* PHP 8.1.22 and 8.2.9 fixed SIGCHLD handling:
* PHP 8.1.22 and 8.2.9 changed SIGCHLD handling:
* https://github.com/php/php-src/pull/11509
* This breaks pcntl_waitpid() at the same time, so it requires special handling.
* This changes pcntl_waitpid() at the same time, so it requires special handling.
*
* It was reverted already and probably won't work in any other PHP version.
* https://github.com/php/php-src/pull/11863
*/
if (phpversion() === '8.1.22' || phpversion() === '8.2.9') {
$this->handleFinishedProcess($status['pid'], $status['status']);
return;
}

while (true) {
Expand Down

0 comments on commit 1a4bb21

Please sign in to comment.