diff options
Diffstat (limited to 'src/state/history/mod.rs')
-rw-r--r-- | src/state/history/mod.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/state/history/mod.rs b/src/state/history/mod.rs index fa02b98..5ed86b3 100644 --- a/src/state/history/mod.rs +++ b/src/state/history/mod.rs @@ -593,9 +593,9 @@ async fn run_pipeline( Res::Read( blocking::unblock(move || { let fh = unsafe { std::fs::File::from_raw_fd(from_r) }; - let env = bincode::deserialize_from(&fh); + let event = bincode::deserialize_from(&fh); let _ = fh.into_raw_fd(); - env + event }) .await, ) @@ -604,6 +604,11 @@ async fn run_pipeline( match read.or(exit).await { Res::Read(Ok(event)) => event_w.send(event).await.unwrap(), Res::Read(Err(e)) => { + if let bincode::ErrorKind::Io(e) = &*e { + if e.kind() == std::io::ErrorKind::UnexpectedEof { + continue; + } + } eprintln!("nbsh: {}", e); return (std::process::ExitStatus::from_raw(1 << 8), false); } |