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 — Missing SIGHUP handler causes orphaned processes to leak ~4.7 GB each after terminal death · Issue #14504 · anomalyco/opencode Closed Labels coreAnything pertaining to core functionality of the application (opencode server stuff) DescriptionBug ReportSummaryWhen a controlling terminal is destroyed (SSH disconnect, tmux pane close, terminal emulator crash), opencode processes become orphaned and continue running indefinitely, each consuming ~4.7 GB of RAM. This is because opencode has no Observed ImpactOn a system running opencode via oh-my-opencode with tmux, 14 orphaned opencode processes accumulated over time, consuming ~66 GB of RAM total. All had Root CauseIn try { await cli.parse() // blocks on TUI promise → stdin } catch (e) { ... } finally { process.exit() // only reached when cli.parse() resolves } When the TUI command runs (
Environment
Reproduction
Proposed FixAdd signal handlers before the main for (const sig of ["SIGHUP", "SIGTERM", "SIGPIPE"] as const) { process.on(sig, () => { process.exit(1) }) }
This ensures Additional ContextThe existing comment on lines 198-200 of
The same class of problem affects the parent opencode process itself — it doesn't react to SIGHUP at all. Investigation Notes
Reacted by John Mutuma Activity
MetadataMetadataAssigneesLabelscoreAnything pertaining to core functionality of the application (opencode server stuff) TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |