Merge branch 'PHP-8.1' into PHP-8.2

* PHP-8.1:
  Use waitpid(-1) over WAIT_ANY
This commit is contained in:
Ilija Tovilo 2023-07-04 10:29:14 +02:00
commit 60dd88c93e
No known key found for this signature in database
GPG Key ID: A4F5D403F118200A

View File

@ -1070,7 +1070,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 | WUNTRACED);
pid = waitpid(-1, &status, WNOHANG | WUNTRACED);
} while (pid <= 0 && errno == EINTR);
if (pid <= 0) {
if (UNEXPECTED(!psig)) {