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
/// Waits until the process receives a shutdown signal, then returns.
///
/// On **Unix** systems this resolves on either `SIGINT` (Ctrl+C) or `SIGTERM`.
/// On **non-Unix** systems only `SIGINT` / Ctrl+C is handled; the SIGTERM arm
/// becomes a never-resolving future.
///
/// This function is used internally by [`run!`](crate::run) and is also
/// available directly when you need finer-grained control over the shutdown
/// sequence.
///
/// # Panics
///
/// Panics if the OS-level signal handler cannot be installed. This is
/// considered a fatal misconfiguration and is intentional.
pub async