From 0d4f59f6261ea7f55b94757dd008adf1509e59ff Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 24 Jun 2023 22:26:25 +0200 Subject: [PATCH] Add missing WUNTRACED I forgot to add this in GH-11509. --- ext/pcntl/pcntl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c index df0f23ca68f43..73f8d068de6a8 100644 --- a/ext/pcntl/pcntl.c +++ b/ext/pcntl/pcntl.c @@ -1362,7 +1362,7 @@ static void pcntl_signal_handler(int signo) errno = 0; /* Although Linux specifies that WNOHANG will never result in EINTR, POSIX doesn't say so: * https://pubs.opengroup.org/onlinepubs/9699919799/functions/waitpid.html */ - pid = waitpid(WAIT_ANY, &status, WNOHANG); + pid = waitpid(WAIT_ANY, &status, WNOHANG | WUNTRACED); } while (pid <= 0 && errno == EINTR); if (pid <= 0) { if (UNEXPECTED(psig == psig_first)) {