Merge branch 'PHP-8.2'

* PHP-8.2:
  Use waitpid(-1) over WAIT_ANY
This commit is contained in:
Ilija Tovilo 2023-07-04 10:29:22 +02:00
commit 149fb8fc34
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)) {