Skip to content

Commit 9788244

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

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

run-tests.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1496,6 +1496,10 @@ function run_all_tests_parallel(array $test_files, array $env, $redir_tested): v
14961496
kill_children($workerProcs);
14971497
error("Could not find worker stdout in array of worker stdouts, THIS SHOULD NOT HAPPEN.");
14981498
}
1499+
if (feof($workerSock)) {
1500+
kill_children($workerProcs);
1501+
error("Worker $i died unexpectedly");
1502+
}
14991503
while (false !== ($rawMessage = fgets($workerSock))) {
15001504
// work around fgets truncating things
15011505
if (($rawMessageBuffers[$i] ?? '') !== '') {

0 commit comments

Comments
 (0)