Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
terminal: Properly kill child process on terminal exit (#41562)
Lukas Wirth94ba24daddaa
diff --git a/crates/terminal/src/terminal.rs b/crates/terminal/src/terminal.rsindex 41c51c38f7b..49dd35528a3 100644--- a/crates/terminal/src/terminal.rs+++ b/crates/terminal/src/terminal.rs@@ -2241,7 +2241,8 @@ unsafe fn append_text_to_term(term: &mut Term<ZedListener>, text_lines: &[&str])impl Drop for Terminal {fn drop(&mut self) {- if let TerminalType::Pty { pty_tx, .. } = &self.terminal_type {+ if let TerminalType::Pty { pty_tx, info } = &mut self.terminal_type {+ info.kill_current_process();pty_tx.0.send(Msg::Shutdown).ok();}}