pub fn safe_exit(code: i32) -> !
Flushes stdout/stderr and terminates the current process.
This is used internally in the library to handle non-critical CLI errors.