Skip to content

Commit 61048f9

Browse files
committed
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1: Fix run-tests.php hanging when a worker process dies without notice (#9931)
2 parents 871d9f2 + 8c0698f commit 61048f9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

run-tests.php

+4
Original file line numberDiff line numberDiff line change
@@ -1504,6 +1504,10 @@ function run_all_tests_parallel(array $test_files, array $env, $redir_tested): v
15041504
kill_children($workerProcs);
15051505
error("Could not find worker stdout in array of worker stdouts, THIS SHOULD NOT HAPPEN.");
15061506
}
1507+
if (feof($workerSock)) {
1508+
kill_children($workerProcs);
1509+
error("Worker $i died unexpectedly");
1510+
}
15071511
while (false !== ($rawMessage = fgets($workerSock))) {
15081512
// work around fgets truncating things
15091513
if (($rawMessageBuffers[$i] ?? '') !== '') {

0 commit comments

Comments
 (0)