Struct shared_child::SharedChild [−][src]
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]
fn send_signal(&self, signal: c_int) -> Result<()>
[src]
Auto Trait Implementations
impl !RefUnwindSafe for SharedChild
impl Send for SharedChild
impl Sync for SharedChild
impl Unpin for SharedChild
impl UnwindSafe for SharedChild
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,