Expand description
Signal and shutdown helpers.
This module provides small process-global signal utilities intended for low-level daemons and worker processes that want explicit signal handling without a heavier runtime.
Structs§
- Shutdown
Flag Guard - Guard that restores previous SIGINT/SIGTERM handlers and shutdown flag on drop.
- Signal
Runtime - Utilities for process signal management.
Constants§
Functions§
- install_
shutdown_ flag - Install SIGINT and SIGTERM handlers that flip a shared shutdown flag.
- install_
shutdown_ flag_ guard - Install SIGINT and SIGTERM handlers and return a restore guard.
- shutdown_
requested - Return whether a shutdown flag was flipped by the installed handler.