Struct unshare::Child[][src]

pub struct Child {
    pub stdin: Option<PipeWriter>,
    pub stdout: Option<PipeReader>,
    pub stderr: Option<PipeReader>,
    // some fields omitted
}

The reference to the running child

Fields

stdin: Option<PipeWriter>

Stdin of a child if it is a pipe

stdout: Option<PipeReader>

Stdout of a child if it is a pipe

stderr: Option<PipeReader>

Stderr of a child if it is a pipe

Implementations

impl Child[src]

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

Returns pid of the process (a mirror of std method)

pub fn pid(&self) -> pid_t[src]

Returns pid of process with correct pid_t type

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

Synchronously wait for child to complete and return exit status

pub fn signal(&self, signal: Signal) -> Result<(), Error>[src]

Send arbitrary unix signal to the process

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

Kill process with SIGKILL signal

pub fn take_pipe_reader(&mut self, fd: RawFd) -> Option<PipeReader>[src]

Returns pipe reader for a pipe declared with file_descriptor()

Returns None for wrong configuration or when called twice for same descriptor

pub fn take_pipe_writer(&mut self, fd: RawFd) -> Option<PipeWriter>[src]

Returns pipe writer for a pipe declared with file_descriptor()

Returns None for wrong configuration or when called twice for same descriptor

Trait Implementations

impl Debug for Child[src]

Auto Trait Implementations

impl RefUnwindSafe for Child

impl Send for Child

impl Sync for Child

impl Unpin for Child

impl UnwindSafe for Child

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.