GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||
GeezerVison is showing github.com — fix: prevent orphaned worker process when killed by jogi47 · Pull Request #11603 · anomalyco/opencode Conversation
|
|
The following comment was made by an LLM, it may be inaccurate: No duplicate PRs found |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I believe this may also resolve #10563. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Nice work on the ppid polling approach — that's a solid safety net for SIGKILL scenarios. One gap I noticed: this PR handles SIGTERM and SIGINT but not SIGHUP, which is the actual signal sent when a terminal tab/window is closed. That's the core trigger for #10563 (orphaned processes on terminal close). The fix for #10563 specifically needs Additionally, I'm working on a broader fix that covers SIGHUP across all long-running entry points (tui, attach, serve) plus a safety net in |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
When OpenCode is spawned programmatically and then killed, the worker process was left orphaned (PPID becomes 1), blocking the parent process from exiting. Changes: - Add SIGTERM/SIGINT handlers in thread.ts to properly shutdown worker - Add parent death detection in worker.ts using process.ppid polling - Add SIGTERM/SIGINT handlers in worker.ts for direct signal handling The worker now detects if its parent dies (even via SIGKILL) and shuts itself down within 1 second. Fixes anomalyco#11527 Co-Authored-By: Claude Opus 4.5 <[email protected]>
c61fd2a to
7a5a9bd
Compare
|
Updated this PR and it is ready for another look.
Could someone re-review when convenient? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Closing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
OpenCode leaves an orphaned process when it itself is killed
There was an error while loading. Please reload this page.