pub fn register_handler() -> Result<()>
Registers the Ctrl+C handler that sets the cancellation flag.
Must be called once before any long-running operation. Additional calls are safe and silently ignored.