pub fn register_ctrlc_handler() -> Result<(), Box<dyn Error>>
Registers a global Ctrl+C handler once. The handler checks GLOBAL_CHILD and kills the child process if present.