Skip to main content

wait_for_shutdown_signal

Function wait_for_shutdown_signal 

Source
pub async fn wait_for_shutdown_signal() -> &'static str
Expand description

Block until the process receives SIGINT or SIGTERM, log the signal at WARN, and return its name.

Intended for use in a tokio::select! alongside a daemon’s main future so the process exits cleanly instead of being hard-killed.