Commit 3290dbe
committed
fix: reap child processes on session stop/kill to prevent zombies
captureOutput goroutine could exit via the done channel without calling
cmd.Wait(), leaving terminated child processes as zombies in the process
table. Moved cmd.Wait() and p.Close() into a defer so the child is
always reaped regardless of exit path.1 parent bbd4c20 commit 3290dbe
1 file changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
477 | 477 | | |
478 | 478 | | |
479 | 479 | | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
480 | 485 | | |
481 | 486 | | |
482 | 487 | | |
| |||
513 | 518 | | |
514 | 519 | | |
515 | 520 | | |
516 | | - | |
| 521 | + | |
517 | 522 | | |
518 | 523 | | |
519 | 524 | | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | 525 | | |
524 | 526 | | |
525 | 527 | | |
| |||
0 commit comments