You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Terminate the process on SIGINT, SIGTERM and SIGHUP
Corbits registered no signal handlers of its own. OpenTUI's vendored
renderer restores the terminal on these signals when a TUI is
mounted, but never calls process.exit, so the process (and the
run's state on disk) was left hanging indefinitely after an external
kill. Outside an interactive session (exec mode, or before a host
mounts) nothing handled the signal at all, so Bun's default
disposition killed the process with no chance to close out run.json.
The new handler restores the terminal and finalizes run state itself
rather than relying on OpenTUI's own listener to run first, since
that would make correctness depend on a vendored listener's
registration order and internals this codebase doesn't own; the
terminal-restore call is idempotent so a redundant call from
OpenTUI's own listener is harmless.
A forked-pty regression test pins the empirical finding this design
depends on: Bun's raw-mode stdin clears ISIG, so a real Ctrl+C
keypress during an interactive session is delivered only as a stdin
byte, never as a SIGINT, leaving the existing double-tap-to-quit
gesture as the sole owner of in-session Ctrl+C.
0 commit comments