Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 46e9c51

Browse files
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)

AltStyle によって変換されたページ (->オリジナル) /