mirror of
https://github.com/php/php-src.git
synced 2024-11-27 03:44:07 +08:00
Fix run-tests.php hanging when a worker process dies without notice (#9931)
run-tests.php with `-jN` can hang if a parallel worker dies without notice. This can happen due to fatal errors in the worker, or if the worker is killed. - run-tests.php (main process) \_ run-tests.php (worker #0) // main process hangs if this one crashes \_ test-001.php (test-001.phpt)
This commit is contained in:
parent
0f7625c47c
commit
8c0698f66b
@ -1583,6 +1583,10 @@ escape:
|
||||
kill_children($workerProcs);
|
||||
error("Could not find worker stdout in array of worker stdouts, THIS SHOULD NOT HAPPEN.");
|
||||
}
|
||||
if (feof($workerSock)) {
|
||||
kill_children($workerProcs);
|
||||
error("Worker $i died unexpectedly");
|
||||
}
|
||||
while (false !== ($rawMessage = fgets($workerSock))) {
|
||||
// work around fgets truncating things
|
||||
if (($rawMessageBuffers[$i] ?? '') !== '') {
|
||||
|
Loading…
Reference in New Issue
Block a user