mitogen: first_stage: Break the while loop in case of EOF
The current implementation can cause an infinite loop, leading to a process that hangs and consumes 100% CPU. This occurs because the EOF condition is not handled properly, resulting in repeated select(...) and read(...) calls. The fix is to properly handle the EOF condition and break out of the loop when it occurs. -SSH command size: 822 +SSH command size: 838 Preamble (mitogen.core + econtext) size: 18226 (17.80KiB) -mitogen.parent 99062 96.7KiB 51235 50.0KiB 51.7% 12936 12.6KiB 13.1% +mitogen.parent 99240 96.9KiB 51244 50.0KiB 51.6% 12956 12.7KiB 13.1% Fixes: https://github.com/mitogen-hq/mitogen/issues/1348 Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>pull/1389/head
parent
f5195edf08
commit
8807cd53be
Loading…
Reference in New Issue