blob: a0aaa47fbcd1cd4fc7b0983bf05bf3938b701582 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
use async_process::unix::CommandExt as _;
impl super::Impl for async_process::Command {
type Child = async_process::Child;
fn new_impl(program: &::std::ffi::OsStr) -> Self {
Self::new(program)
}
fn stdin_impl(&mut self, cfg: ::std::process::Stdio) {
self.stdin(cfg);
}
fn stdout_impl(&mut self, cfg: ::std::process::Stdio) {
self.stdout(cfg);
}
fn stderr_impl(&mut self, cfg: ::std::process::Stdio) {
self.stderr(cfg);
}
unsafe fn pre_exec_impl<F>(&mut self, f: F)
where
F: FnMut() -> ::std::io::Result<()> + Send + Sync + 'static,
{
self.pre_exec(f);
}
fn spawn_impl(&mut self) -> crate::Result<Self::Child> {
self.spawn().map_err(crate::error::spawn)
}
}
|