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
//! Waits for the operating-system signal used by explicit signal mode.
//!
//! [`Supervisor::run_with_os_signals`](crate::Supervisor::run_with_os_signals) calls this helper.
//! Other run modes install no process signal listeners. The helper only waits; the runtime
//! lifecycle code starts shutdown after it returns.
//!
//! Unix waits for `SIGINT`, `SIGTERM`, or `SIGQUIT`. Other platforms use Tokio's Ctrl-C listener.
//! On Unix, installing Tokio signal handlers changes process-global behavior that is not restored when the listeners are dropped.
/// Waits for a supported process shutdown signal.
///
/// The result does not identify which signal arrived.
///
/// # Errors
///
/// Returns an I/O error when a signal listener cannot be installed.
pub async
/// Waits until the process receives a shutdown signal.
///
/// # Errors
///
/// Returns an I/O error when Ctrl-C waiting fails.
pub async