diff --git a/mux/src/localpane.rs b/mux/src/localpane.rs index 06e3842f7..dc658c72c 100644 --- a/mux/src/localpane.rs +++ b/mux/src/localpane.rs @@ -685,25 +685,13 @@ impl LocalPane { } } -fn bounded_kill_wait(child: &mut Box) { - for attempt in 0..5 { - let _ = child.kill(); - if attempt > 0 { - std::thread::sleep(std::time::Duration::from_millis(50)); - } - - if let Ok(Some(_)) = child.try_wait() { - break; - } - } -} - impl Drop for LocalPane { fn drop(&mut self) { // Avoid lingering zombies if we can, but don't block forever. // if let ProcessState::Running { child, .. } = &mut *self.process.borrow_mut() { - bounded_kill_wait(child); + let _ = child.kill(); + let _ = child.try_wait(); } } }