Skip to content

Commit 149fb8f

Browse files
committed
Merge branch 'PHP-8.2'
* PHP-8.2: Use waitpid(-1) over WAIT_ANY
2 parents 7b355e8 + 60dd88c commit 149fb8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/pcntl/pcntl.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1070,7 +1070,7 @@ static void pcntl_signal_handler(int signo)
10701070
errno = 0;
10711071
/* Although Linux specifies that WNOHANG will never result in EINTR, POSIX doesn't say so:
10721072
* https://pubs.opengroup.org/onlinepubs/9699919799/functions/waitpid.html */
1073-
pid = waitpid(WAIT_ANY, &status, WNOHANG | WUNTRACED);
1073+
pid = waitpid(-1, &status, WNOHANG | WUNTRACED);
10741074
} while (pid <= 0 && errno == EINTR);
10751075
if (pid <= 0) {
10761076
if (UNEXPECTED(!psig)) {

0 commit comments

Comments
 (0)