Skip to main content

setup_signal_handler

Function setup_signal_handler 

Source
pub fn setup_signal_handler() -> Result<()>
Expand description

Sets up the signal handler for graceful shutdown (RES-M4).

Installs a handler for SIGINT (Ctrl+C) and SIGTERM that:

  1. Sets the shutdown flag
  2. Logs the shutdown request
  3. Flushes metrics

ยงErrors

Returns an error if the signal handler cannot be installed.