Repository navigation
linux: terminate on SIGTERM/SIGINT in the host scaffold and example - #168
Merged
Merged
Conversation
The Linux system adapter has shipped InstallShutdownHook since #128, but nothing outside the integration probe installed it — and the GTK shutdown signal never fires on a termination signal. A TERM therefore broke the embedded Racket backend while the GTK process kept running: Fulcrum 0.4.1 kept a visible window whose searches silently did nothing, and only SIGKILL removed it. Install the hook in the host scaffold and the Taskboard example, running the same orderly shutdown as the GTK shutdown signal; the watcher thread hard-exits with EXIT_SUCCESS once it returns.
# Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Reproduced on Fulcrum 0.4.1 (Ubuntu 26.04, GNOME/Wayland):
kill -TERMon a running app broke the embedded Racket backend (Rivet backend terminated: user break) while the GTK process stayed alive. The window remained, every search silently did nothing, and onlykill -9removed it.systemd --user stop, session logout, andkillallall send exactly this signal.Root cause
The Linux system adapter has shipped
InstallShutdownHooksince #128 with a solid self-pipe + watcher design (covered by--shutdown-probe), but nothing outside the integration probe installs it. The GTKshutdownsignal never fires on an OS signal, so the orderly cleanup path is unreachable for terminations.Change
platform/linux/host/src/main.cpp(the scaffold everyrivet-newapp copies): refactor the GTK shutdown cleanup intoperform_orderly_shutdownand install it viaInstallShutdownHookinmain.examples/taskboard/linux/src/main.cpp: same wiring.Verification
RivetIntegration --shutdown-probe:TERM→ callback runs (marker written) → exit code 0.Apps with their own copies of the scaffold (Fulcrum, SyncPilot) need the same one-liner in their
linux/src/main.cpp— follow-ups will land in those repos.