Fixed logic for EINTR propagation

This commit is contained in:
2026-01-28 20:48:29 -05:00
parent 7f3e1cfcee
commit 70f0e849ba
7 changed files with 121 additions and 34 deletions

View File

@@ -106,6 +106,17 @@ fn fern_interactive() {
let mut partial_input = String::new();
'outer: loop {
while signals_pending() {
if let Err(e) = check_signals() {
if let ShErrKind::ClearReadline = e.kind() {
partial_input.clear();
if !signals_pending() {
continue 'outer;
}
};
eprintln!("{e}");
}
}
// Main loop
let edit_mode = write_shopts(|opt| opt.query("prompt.edit_mode"))
.unwrap()