Skip to main content

Child

Trait Child 

Source
pub trait Child:
    Debug
    + ChildKiller
    + Send {
    // Required methods
    fn try_wait(&mut self) -> IoResult<Option<ExitStatus>>;
    fn wait(&mut self) -> IoResult<ExitStatus>;
    fn process_id(&self) -> Pid;
}
Expand description

Represents a child process spawned into the pty. This handle can be used to wait for or terminate that child process.

Required Methods§

Source

fn try_wait(&mut self) -> IoResult<Option<ExitStatus>>

Poll the child to see if it has completed. Does not block. Returns None if the child has not yet terminated, else returns its exit status.

Source

fn wait(&mut self) -> IoResult<ExitStatus>

Blocks execution until the child process has completed, yielding its exit status.

Source

fn process_id(&self) -> Pid

Returns the process identifier of the child process, if applicable

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Child for Child

Implementors§