We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ee42621 commit 46e9c51Copy full SHA for 46e9c51
ext/pcntl/pcntl.c
@@ -1360,7 +1360,7 @@ static void pcntl_signal_handler(int signo)
1360
errno = 0;
1361
/* Although Linux specifies that WNOHANG will never result in EINTR, POSIX doesn't say so:
1362
* https://pubs.opengroup.org/onlinepubs/9699919799/functions/waitpid.html */
1363
- pid = waitpid(WAIT_ANY, &status, WNOHANG | WUNTRACED);
+ pid = waitpid(-1, &status, WNOHANG | WUNTRACED);
1364
} while (pid <= 0 && errno == EINTR);
1365
if (pid <= 0) {
1366
if (UNEXPECTED(!psig)) {
0 commit comments