Skip to content

Commit

Permalink
Merge branch 'PHP-8.2'
Browse files Browse the repository at this point in the history
* PHP-8.2:
  Use waitpid(-1) over WAIT_ANY
  • Loading branch information
iluuu1994 committed Jul 4, 2023
2 parents 7b355e8 + 60dd88c commit 149fb8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/pcntl/pcntl.c
Expand Up @@ -1070,7 +1070,7 @@ static void pcntl_signal_handler(int signo)
errno = 0;
/* Although Linux specifies that WNOHANG will never result in EINTR, POSIX doesn't say so:
* https://pubs.opengroup.org/onlinepubs/9699919799/functions/waitpid.html */
pid = waitpid(WAIT_ANY, &status, WNOHANG | WUNTRACED);
pid = waitpid(-1, &status, WNOHANG | WUNTRACED);
} while (pid <= 0 && errno == EINTR);
if (pid <= 0) {
if (UNEXPECTED(!psig)) {
Expand Down

0 comments on commit 149fb8f

Please sign in to comment.