diff --git a/src/panic.rs b/src/panic.rs index e4f8fa075..93c87d9cc 100644 --- a/src/panic.rs +++ b/src/panic.rs @@ -18,13 +18,11 @@ pub fn panic_handler(main: impl FnOnce() -> i32 + UnwindSafe) -> ! { PROGRAM_NAME.get().unwrap(), unsafe { libc::getpid() } ); + // Move the cursor down so it isn't blocking the text + eprintf!("\n"); let mut buf = [0_u8; 1]; loop { - // Move the cursor down so it isn't blocking the text - eprintf!("\n"); - let Ok(n) = read_blocked(STDIN_FILENO, &mut buf) else { - break; - }; + let n = read_blocked(STDIN_FILENO, &mut buf).unwrap_or(0); if n == 0 || matches!(buf[0], b'q' | b'\n' | b'\r') { eprintf!("\n"); std::process::abort();