Struct clonablechild::ClonableChild
[−]
[src]
pub struct ClonableChild { /* fields omitted */ }
Representation of a clonable std::process::Child
.
Methods
impl ClonableChild
[src]
fn new(child: Child) -> Self
Creates a new ClonableChild
by consuming and wrapping the given Child
.
fn kill(&self) -> Result<()>
Forces the child to exit. This is equivalent to sending a SIGKILL on unix platforms and calling TerminateProcess on Windows.
This method first tries to use the ordinary Child::kill()
, but if that is blocked by
another thread waiting for the child it will kill it itself in the same way Child::kill()
would have done.
fn id(&self) -> u32
Returns the OS-assigned process identifier associated with this child. This value is
obtained from Child::id()
in ClonableChild::new()
and then that value is returned every
time.
fn wait(&self) -> Result<ExitStatus>
Behaves just like Child::wait()
, see documentation for that method.
fn stdin(&mut self) -> Option<ChildStdin>
Retrieve the stdin stream from the child if one exist. Will only return something on the first call.
fn stdout(&mut self) -> Option<ChildStdout>
Retrieve the stdout stream from the child if one exist. Will only return something on the first call.
fn stderr(&mut self) -> Option<ChildStderr>
Retrieve the stderr stream from the child if one exist. Will only return something on the first call.
Trait Implementations
impl Clone for ClonableChild
[src]
fn clone(&self) -> ClonableChild
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more