tt = { path = "../tt", version = "0.0.0" }
base_db = { path = "../base_db", version = "0.0.0" }
+stdx = { path = "../stdx", version = "0.0.0" }
};
use crossbeam_channel::{bounded, Receiver, Sender};
+use stdx::JodChild;
use crate::{
msg::{ErrorCode, Message, Request, Response, ResponseError},
}
struct Process {
- child: Child,
-}
-
-impl Drop for Process {
- fn drop(&mut self) {
- let _ = self.child.kill();
- }
+ child: JodChild,
}
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 })
}