summaryrefslogtreecommitdiffstats
path: root/src/shell/history/mod.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2022-01-08 19:31:00 -0500
committerJesse Luehrs <doy@tozt.net>2022-01-08 19:31:00 -0500
commit747f647f6cdcf202314b7eb9a2060c9ab2a488aa (patch)
treeceb75ad0fc727ec8a89e42322e1c399de77d1e11 /src/shell/history/mod.rs
parent1839a1f5b65c84871de6a547df2192d06ab14092 (diff)
downloadnbsh-747f647f6cdcf202314b7eb9a2060c9ab2a488aa.tar.gz
nbsh-747f647f6cdcf202314b7eb9a2060c9ab2a488aa.zip
fix file descriptor leak
Diffstat (limited to 'src/shell/history/mod.rs')
-rw-r--r--src/shell/history/mod.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/shell/history/mod.rs b/src/shell/history/mod.rs
index 7b5634d..909a6e8 100644
--- a/src/shell/history/mod.rs
+++ b/src/shell/history/mod.rs
@@ -581,6 +581,7 @@ async fn run_pipeline(
}
}
if let (true, Some(status)) = (read_done, exit_done) {
+ nix::unistd::close(from_r).unwrap();
// nix::sys::signal::Signal is repr(i32)
#[allow(clippy::as_conversions)]
return Ok((