1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//! # Cross-platform OS signal handling.
//!
//! Provides [`wait_for_shutdown_signal`] an async helper that completes when the process receives a termination signal.
//!
//! ## Signals
//! **Unix platforms:**
//! - `SIGINT` (Ctrl-C in terminal)
//! - `SIGTERM` (default kill signal, used by systemd/Kubernetes)
//! - `SIGQUIT` (quit signal, often used for core dumps or hard stop)
//!
//! **Windows platforms:**
//! - `Ctrl-C` via [`tokio::signal::ctrl_c`]
/// Waits for a termination signal.
///
/// Each call creates independent signal listeners.
///
/// Returns `Ok(())` when any signal is received, or `Err` if signal registration fails.
pub async
/// Waits for a termination signal.
///
/// Each call creates independent signal listeners.
///
/// Returns `Ok(())` when any signal is received, or `Err` if signal registration fails.
pub async