Commit d71a4d3
committed
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
-mitogen.parent 98746 96.4KiB 51215 50.0KiB 51.9% 12922 12.6KiB 13.1%
+mitogen.parent 98827 96.5KiB 51219 50.0KiB 51.8% 12942 12.6KiB 13.1%
Fixes: #1348
Signed-off-by: Marc Hartmayer <[email protected]>1 parent 24347f9 commit d71a4d3
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1416 | 1416 | | |
1417 | 1417 | | |
1418 | 1418 | | |
| 1419 | + | |
| 1420 | + | |
1419 | 1421 | | |
1420 | 1422 | | |
1421 | 1423 | | |
| |||
1437 | 1439 | | |
1438 | 1440 | | |
1439 | 1441 | | |
1440 | | - | |
1441 | | - | |
| 1442 | + | |
| 1443 | + | |
1442 | 1444 | | |
1443 | 1445 | | |
1444 | 1446 | | |
| |||
0 commit comments