pub trait Child: Debug + ChildKiller {
// Required methods
fn try_wait(&mut self) -> Result<Option<ExitStatus>, Error>;
fn wait(&mut self) -> Result<ExitStatus, Error>;
fn process_id(&self) -> Option<u32>;
}
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§
Sourcefn try_wait(&mut self) -> Result<Option<ExitStatus>, Error>
fn try_wait(&mut self) -> Result<Option<ExitStatus>, Error>
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.
Sourcefn wait(&mut self) -> Result<ExitStatus, Error>
fn wait(&mut self) -> Result<ExitStatus, Error>
Blocks execution until the child process has completed, yielding its exit status.
Sourcefn process_id(&self) -> Option<u32>
fn process_id(&self) -> Option<u32>
Returns the process identifier of the child process, if applicable