Merge #7512
7512: Reap proc macro server instances r=lnicola a=lnicola Fixes #7510, but not the root cause. Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
This commit is contained in:
commit
379b677559
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -1158,6 +1158,7 @@ dependencies = [
|
||||
"log",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"stdx",
|
||||
"tt",
|
||||
]
|
||||
|
||||
|
@ -18,3 +18,4 @@ jod-thread = "0.1.1"
|
||||
|
||||
tt = { path = "../tt", version = "0.0.0" }
|
||||
base_db = { path = "../base_db", version = "0.0.0" }
|
||||
stdx = { path = "../stdx", version = "0.0.0" }
|
||||
|
@ -10,6 +10,7 @@ use std::{
|
||||
};
|
||||
|
||||
use crossbeam_channel::{bounded, Receiver, Sender};
|
||||
use stdx::JodChild;
|
||||
|
||||
use crate::{
|
||||
msg::{ErrorCode, Message, Request, Response, ResponseError},
|
||||
@ -116,13 +117,7 @@ struct Task {
|
||||
}
|
||||
|
||||
struct Process {
|
||||
child: Child,
|
||||
}
|
||||
|
||||
impl Drop for Process {
|
||||
fn drop(&mut self) {
|
||||
let _ = self.child.kill();
|
||||
}
|
||||
child: JodChild,
|
||||
}
|
||||
|
||||
impl Process {
|
||||
@ -131,7 +126,7 @@ impl Process {
|
||||
args: impl IntoIterator<Item = impl AsRef<OsStr>>,
|
||||
) -> io::Result<Process> {
|
||||
let args: Vec<OsString> = args.into_iter().map(|s| s.as_ref().into()).collect();
|
||||
let child = mk_child(&path, &args)?;
|
||||
let child = JodChild(mk_child(&path, &args)?);
|
||||
Ok(Process { child })
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user