pub trait ProcessControl: Send {
// Required methods
fn pid(&self) -> Option<u32>;
fn kill_tree(&self);
fn wait(&mut self) -> BoxFuture<'_, Result<ExitStatus>>;
fn close_output(&mut self);
}Expand description
Control half of a running process.
Required Methods§
Sourcefn kill_tree(&self)
fn kill_tree(&self)
Kills the process and all its descendants (killProcessTree: killpg(SIGKILL) on
Unix, taskkill /F /T on Windows). Never fails; a dead process is ignored.
Sourcefn wait(&mut self) -> BoxFuture<'_, Result<ExitStatus>>
fn wait(&mut self) -> BoxFuture<'_, Result<ExitStatus>>
Waits for the process to exit. Cancel-safe.
Sourcefn close_output(&mut self)
fn close_output(&mut self)
Stops reading output (pipes inherited by detached descendants may never close).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".