| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
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 <noreply@anthropic.com>
Sorry, something went wrong.
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Issue for this PR
Closes #14504
Type of change
What does this PR do?
Adds signal handlers for SIGHUP, SIGTERM, and SIGPIPE that call process.exit(1). Without these, when a terminal dies (SSH disconnect, tmux pane close), opencode processes become orphaned because cli.parse() never resolves and process.exit() in the finally block never runs. Each orphan leaks ~4.7 GB of RAM.
How did you verify your code works?
Reviewed the 3-line change. process.on(sig, () => process.exit(1)) triggers the existing finally-block cleanup. All CI checks pass.
Screenshots / recordings
N/A - no UI change.
Checklist