Skip to main content

Module signal

Module signal 

Source
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§

ShutdownFlagGuard
Guard that restores previous SIGINT/SIGTERM handlers and shutdown flag on drop.
SignalRuntime
Utilities for process signal management.

Constants§

SIGINT
SIGKILL
SIGPIPE
SIGTERM

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.

Type Aliases§

SignalSet
ThreadId