aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_proc_macro/src/process.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/crates/ra_proc_macro/src/process.rs b/crates/ra_proc_macro/src/process.rs
index 3e8dd4314..07dc1bf9e 100644
--- a/crates/ra_proc_macro/src/process.rs
+++ b/crates/ra_proc_macro/src/process.rs
@@ -45,6 +45,12 @@ struct Process {
45 child: Child, 45 child: Child,
46} 46}
47 47
48impl Drop for Process {
49 fn drop(&mut self) {
50 let _ = self.child.kill();
51 }
52}
53
48impl Process { 54impl Process {
49 fn run(process_path: &Path) -> Result<Process, io::Error> { 55 fn run(process_path: &Path) -> Result<Process, io::Error> {
50 let child = Command::new(process_path.clone()) 56 let child = Command::new(process_path.clone())
@@ -186,8 +192,6 @@ fn client_loop(task_rx: Receiver<Task>, mut process: Process) {
186 result_tx.send(res).unwrap(); 192 result_tx.send(res).unwrap();
187 } 193 }
188 } 194 }
189
190 let _ = process.child.kill();
191} 195}
192 196
193fn send_request( 197fn send_request(