Skip to content

fix: shut down the daemon gracefully on SIGTERM - #228

Merged
tcballard merged 2 commits into
mainfrom
fix/daemon-signal-lifecycle
Sep 5, 2026
Merged

fix: shut down the daemon gracefully on SIGTERM#228
tcballard merged 2 commits into
mainfrom
fix/daemon-signal-lifecycle

Conversation

@tcballard

@tcballard tcballard commented Sep 4, 2026

Copy link
Copy Markdown
Owner

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:

  • CI: full workspace tests, formatting, Clippy and dependency checks pass. Release-build, size and packaging gates are still running.
  • Relay interoperability: both jobs pass.
  • Formatting and focused Clippy pass locally. The three process tests compile but fail during IPC startup with EPERM because this workspace denies Unix-socket binding; CI executes them successfully.

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.

Register signals before IPC readiness, join reload cancellation before service teardown, and add executable restart and reload regressions. Refs #26.
@tcballard
tcballard marked this pull request as ready for review September 4, 2026 23:37
@tcballard
tcballard merged commit 8727f0e into main Sep 5, 2026
5 checks passed
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