fix: shut down the daemon gracefully on SIGTERM - #228
Merged
Conversation
Register signals before IPC readiness, join reload cancellation before service teardown, and add executable restart and reload regressions. Refs #26.
tcballard
marked this pull request as ready for review
September 4, 2026 23:37
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.
Purpose
Refs #26. Handle systemd's SIGTERM through the daemon's existing graceful shutdown path.
Register SIGINT/SIGTERM and configured SIGHUP handlers before IPC readiness, and stop and join the reload task before service teardown. Update the installation guide and man page. No dependency changes.
Three executable tests cover shutdown and IPC cleanup, concurrent clients, restart-persistent identity and sealed outbox, and accepted/rejected reloads. The follow-up review makes identity comparisons reject missing or empty fields; the exact outbox-persistence check remains.
Verification
For head
8a8bf1ab2301dd1d44c0b2953fa0cbc9cdb55b23:The original local release build totalled 6,117,624 bytes, below 10 MiB. The follow-up changes only test code.
This does not close the full G1 or target-host lifecycle gate. No live-phone, Omarchy, public-relay or Tor qualification is claimed. Contributor PRs #224/#226 are outside this change.