Skip to main content

spawn_handler

Function spawn_handler 

Source
pub fn spawn_handler(token: CancellationToken)
Expand description

Spawn a task that cancels token on SIGTERM or SIGINT, and logs SIGHUP (config reload is not yet implemented).

ยงPanics

Panics if the process cannot install the SIGTERM/SIGINT/SIGHUP handlers (e.g. the signal already has a conflicting handler). This is a fatal startup condition.