Skip to content

fix(desktop): quit cleanly on SIGTERM/SIGINT/SIGHUP so termination isn't misreported as a crash (#2821)#768

Merged
inkeep-oss-sync[bot] merged 1 commit into
mainfrom
copybara/sync
Jul 22, 2026
Merged

fix(desktop): quit cleanly on SIGTERM/SIGINT/SIGHUP so termination isn't misreported as a crash (#2821)#768
inkeep-oss-sync[bot] merged 1 commit into
mainfrom
copybara/sync

Conversation

@inkeep-oss-sync

Copy link
Copy Markdown
Contributor

Copybara-translated 1 Inkeep OSS change. Rebase-merge this PR so the prepared commit lands directly on public main.

…n't misreported as a crash (#2821)

A termination signal (macOS logout, killall, Activity Monitor's Quit, or a
parent process) is an orderly request to stop, not an app crash. The main
process had no signal handlers, so Node's default disposition terminated it
without running Electron's before-quit / will-quit sequence. The dirty-shutdown
sentinel was left behind and the next launch misread the session as a crash
(previous session ended without a clean quit), inviting a bug report.

Add installSignalCleanQuit: on the first SIGTERM/SIGINT/SIGHUP it clears the
sentinel synchronously (durable against a SIGKILL escalation racing the async
teardown) then drives app.quit() so the full will-quit teardown still runs.
Mirrors the existing teardown-signal handling in the sibling utility processes
(pty-host, server-entry) and is not a userland uncaughtException handler.
Genuine crashes still prompt: a native crash delivers no signal, and the
boot-time minidump scan stays the authoritative native-crash signal.

PRD-7522

GitOrigin-RevId: 461bc150d19345eb43bb33c8698cce802333b4d6
@inkeep-oss-sync
inkeep-oss-sync Bot merged commit f348c9f into main Jul 22, 2026
@inkeep-oss-sync
inkeep-oss-sync Bot deleted the copybara/sync branch July 22, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant