1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-19 11:21:39 +03:00

don't accumulate lingering zombies after closing a tab

This commit is contained in:
Wez Furlong 2018-03-04 19:29:18 -08:00
parent 2b822687be
commit 1c4500082f

View File

@ -28,6 +28,14 @@ struct Tab {
pty: RefCell<MasterPty>, pty: RefCell<MasterPty>,
} }
impl Drop for Tab {
fn drop(&mut self) {
// Avoid lingering zombies
self.process.borrow_mut().kill().ok();
self.process.borrow_mut().wait().ok();
}
}
struct Tabs { struct Tabs {
tabs: Vec<Tab>, tabs: Vec<Tab>,
active: usize, active: usize,