Commit f972b9b
refactor: extract _cleanup_agent helper to deduplicate process shutdown sequence
The streaming and blocking capture paths both performed the same four-step
cleanup (kill process, close pipe fds, drain threads, finalize pipes) inline.
Extract into _cleanup_agent so the sequence is defined once and both callers
stay in sync if it ever needs to change.
Co-authored-by: Ralphify <noreply@ralphify.co>1 parent 01ee104 commit f972b9b
1 file changed
+22
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
456 | 456 | | |
457 | 457 | | |
458 | 458 | | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
| 459 | + | |
463 | 460 | | |
464 | 461 | | |
465 | 462 | | |
| |||
561 | 558 | | |
562 | 559 | | |
563 | 560 | | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
564 | 581 | | |
565 | 582 | | |
566 | 583 | | |
| |||
681 | 698 | | |
682 | 699 | | |
683 | 700 | | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
| 701 | + | |
688 | 702 | | |
689 | 703 | | |
690 | 704 | | |
| |||
0 commit comments