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:
- Sets the shutdown flag
- Logs the shutdown request
- Flushes metrics
ยงErrors
Returns an error if the signal handler cannot be installed.