pub struct ProcessRunner;Expand description
Synchronous bounded child-process runner.
On Unix, each child is placed in a new process group. Capture pipes are
nonblocking and are closed after a bounded drain grace, so even a descendant
that escapes the group cannot hold ProcessRunner::run open indefinitely.
Platforms without this implementation fail before spawning with
ProcessRunError::UnsupportedPlatformGuarantee.
Implementations§
Source§impl ProcessRunner
impl ProcessRunner
Sourcepub fn run(spec: &ProcessSpec) -> Result<ProcessOutcome, ProcessRunError>
pub fn run(spec: &ProcessSpec) -> Result<ProcessOutcome, ProcessRunError>
Run the specified child, concurrently drain stdout/stderr, enforce the deadline, and return only after the child has been reaped.
Sourcepub fn run_cancellable(
spec: &ProcessSpec,
cancellation: &ProcessCancellation,
) -> Result<ProcessOutcome, ProcessRunError>
pub fn run_cancellable( spec: &ProcessSpec, cancellation: &ProcessCancellation, ) -> Result<ProcessOutcome, ProcessRunError>
Run with an explicit cooperative cancellation token.
Trait Implementations§
Source§impl Clone for ProcessRunner
impl Clone for ProcessRunner
impl Copy for ProcessRunner
Source§impl Debug for ProcessRunner
impl Debug for ProcessRunner
Auto Trait Implementations§
impl Freeze for ProcessRunner
impl RefUnwindSafe for ProcessRunner
impl Send for ProcessRunner
impl Sync for ProcessRunner
impl Unpin for ProcessRunner
impl UnsafeUnpin for ProcessRunner
impl UnwindSafe for ProcessRunner
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more