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> stdout: Option<PipeReader> stderr: Option<PipeReader>

Methods

impl Child
[src]

fn id(&self) -> u32

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

fn pid(&self) -> pid_t

Returns pid of process with correct pid_t type

fn wait(&mut self) -> Result<ExitStatusError>

Synchronously wait for child to complete and return exit status

fn signal(&self, signal: SigNum) -> Result<()Error>

Send arbitrary unix signal to the process

fn kill(&self) -> Result<()Error>

Kill process with SIGKILL signal

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

Returns pipe reader for a pipe declared with file_descriptor()

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

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

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]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.