Struct shared_child::SharedChild[][src]

pub struct SharedChild { /* fields omitted */ }

Implementations

impl SharedChild[src]

pub fn spawn(command: &mut Command) -> Result<SharedChild>[src]

Spawn a new SharedChild from a std::process::Command.

pub fn id(&self) -> u32[src]

Return the child process ID.

pub fn wait(&self) -> Result<ExitStatus>[src]

Wait for the child to exit, blocking the current thread, and return its exit status.

pub fn try_wait(&self) -> Result<Option<ExitStatus>>[src]

Return the child’s exit status if it has already exited. If the child is still running, return Ok(None).

pub fn kill(&self) -> Result<()>[src]

Send a kill signal to the child. On Unix this sends SIGKILL, and you should call wait afterwards to avoid leaving a zombie. If the process has already been waited on, this returns Ok(()) and does nothing.

pub fn into_inner(self) -> Child[src]

Consume the SharedChild and return the std::process::Child it contains.

We never reap the child process except through Child::wait, so the child object’s inner state is correct, even if it was waited on while it was shared.

Trait Implementations

impl Debug for SharedChild[src]

impl SharedChildExt for SharedChild[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.