Skip to content

feat: graceful SIGINT/SIGTERM for soma-daemon #32

Description

@rmems

Summary

Handle SIGINT / SIGTERM in soma-daemon so the tick loop shuts down cleanly instead of hard-exiting mid-tick.

Context

Binary: src/bin/soma_daemon.rs. Prefer signal handling that works on Linux CI and local dev; document Windows limits if any.

Implementation plan

  1. Install signal handlers (e.g. ctrlc or tokio/std signal) for SIGINT/SIGTERM
  2. Set a shutdown flag consumed by the main loop
  3. Flush logs / stop cleanly; exit 0 on graceful stop
  4. Unit or integration test where practical (or documented manual verification)

Acceptance criteria

  • SIGINT/SIGTERM stop the daemon without panic
  • Behavior documented briefly in README or REVIEW.md
  • Default tests still green
  • Assignee: @rmems

Relationships

  • Milestone: v0.2 — Stub quality
  • Binary-only; no registry redesign

Out of scope

  • Kubernetes lifecycle probes
  • Multi-process supervision

Metadata

Metadata

Assignees

Labels

clienhancementNew feature or requestreadyReady to implementsize:MMedium: ~1 PR, half day to a day

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions