Commit c2746dc
fix: SIGKILL orphan group and clean up dead process workers on unexpected exit
Two fixes for surviving worker processes killing replacements:
1. Process exit monitor: when a process dies unexpectedly, kill its
entire process group before failover. The main process is dead but
workers (--workers N) may survive and interfere with replacements.
2. Orphan cleanup: always SIGKILL the orphan's process group after
the port is free, instead of only when the port is still in use.
Workers may have released the port but still be running shutdown
handlers that kill the new process via shared app directory state.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent a583df7 commit c2746dc
2 files changed
+17
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
448 | 448 | | |
449 | 449 | | |
450 | 450 | | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
459 | 461 | | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
| 462 | + | |
465 | 463 | | |
466 | 464 | | |
467 | 465 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1517 | 1517 | | |
1518 | 1518 | | |
1519 | 1519 | | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
1520 | 1526 | | |
1521 | 1527 | | |
1522 | 1528 | | |
| |||
0 commit comments