Skip to content

Commit 0346fe4

Browse files
committed
Fix zombie ssh processes from accumulating
1 parent 4bb8ef5 commit 0346fe4

File tree

1 file changed

+9
-0
lines changed
  • gix-transport/src/client/blocking_io

1 file changed

+9
-0
lines changed

gix-transport/src/client/blocking_io/file.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,15 @@ impl client::TransportWithoutIO for SpawnProcessOnDemand {
126126
}
127127
}
128128

129+
impl Drop for SpawnProcessOnDemand {
130+
fn drop(&mut self) {
131+
if let Some(mut child) = self.child.take() {
132+
child.kill().ok();
133+
child.wait().ok();
134+
}
135+
}
136+
}
137+
129138
struct ReadStdoutFailOnError {
130139
recv: std::sync::mpsc::Receiver<std::io::Error>,
131140
read: std::process::ChildStdout,

0 commit comments

Comments
 (0)