Repository navigation
Commit b490a54
fix: handle SIGHUP/SIGTERM/SIGPIPE to prevent orphaned processes
When a controlling terminal is destroyed (SSH disconnect, tmux pane
close), opencode processes become orphaned and continue running
indefinitely because no signal handler triggers process.exit(). Add
handlers for SIGHUP, SIGTERM, and SIGPIPE so the existing subprocess
cleanup in the finally block runs promptly.
Fixes anomalyco#14504
Co-Authored-By: Claude Opus 4.6 <[email protected]>1 parent 206d81e commit b490a54
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
48 | 52 | | |
49 | 53 | | |
50 | 54 | | |
| |||
0 commit comments