Commit aa7d95b
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.
Fixes: #1348
Signed-off-by: Marc Hartmayer <[email protected]>1 parent 7be79d0 commit aa7d95b
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