Skip to content

Commit 46e9c51

Browse files
committed
Use waitpid(-1) over WAIT_ANY
This macro is only available in glibc. Closes GH-11588
1 parent ee42621 commit 46e9c51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/pcntl/pcntl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1360,7 +1360,7 @@ static void pcntl_signal_handler(int signo)
13601360
errno = 0;
13611361
/* Although Linux specifies that WNOHANG will never result in EINTR, POSIX doesn't say so:
13621362
* https://pubs.opengroup.org/onlinepubs/9699919799/functions/waitpid.html */
1363-
pid = waitpid(WAIT_ANY, &status, WNOHANG | WUNTRACED);
1363+
pid = waitpid(-1, &status, WNOHANG | WUNTRACED);
13641364
} while (pid <= 0 && errno == EINTR);
13651365
if (pid <= 0) {
13661366
if (UNEXPECTED(!psig)) {

0 commit comments

Comments
 (0)