Skip to main content

Module signal

Module signal 

Source
Expand description

Graceful shutdown signal handling. Signal handling for graceful shutdown on SIGINT and SIGTERM.

Structs§

ShutdownSignal
Thread-safe shutdown coordination for signal-driven graceful exit.

Functions§

get_or_install_handlers
Return the existing shutdown signal or install handlers if none exists.
install_handlers
Register SIGINT and SIGTERM handlers and return the shared shutdown signal.
install_handlers_early
Install minimal signal handlers as early as possible.
reset_sigpipe
Reset SIGPIPE to default disposition for standard Unix CLI behavior.
write_shutdown_message
Emit the user-facing shutdown banner to stderr from the main thread.