We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7b355e8 + 60dd88c commit 149fb8fCopy full SHA for 149fb8f
ext/pcntl/pcntl.c
@@ -1070,7 +1070,7 @@ static void pcntl_signal_handler(int signo)
1070
errno = 0;
1071
/* Although Linux specifies that WNOHANG will never result in EINTR, POSIX doesn't say so:
1072
* https://pubs.opengroup.org/onlinepubs/9699919799/functions/waitpid.html */
1073
- pid = waitpid(WAIT_ANY, &status, WNOHANG | WUNTRACED);
+ pid = waitpid(-1, &status, WNOHANG | WUNTRACED);
1074
} while (pid <= 0 && errno == EINTR);
1075
if (pid <= 0) {
1076
if (UNEXPECTED(!psig)) {
0 commit comments