Enum ubend::PipeSetup[][src]

pub enum PipeSetup {
    Inherit,
    Pipe,
    Null,
    Redirect(Target),
    Temp,
    FileDescr(c_int),
    FileName(StringMode),
    File(File),
}

Setup a pipe.

Variants

Inherit the stream from the parent process. This is the default for stderr and for stdin of the first process in the pipe chain.

Open a pipe to the parent process or between processes. This is the default for stdout and for stdin of all but the first process in the pipe chain.

Open a pipe to /dev/null.

Redirect this stream to the specified target stream. Only stdout and stderr can be redirected this way and only to each other. If a stream is redirected to itself it is equivalent to [PipeSetup::Pipe].

Connect the stream to a temp file. If supported this is done via the operating systems native temp file support using the O_TMPFILE flag. Such a file is written to the hard disk, but has no name and will be deleted after the file handle to it is closed.

If the operating system or filesystem of /tmp does not support the O_TMPFILE flag the same behaviour is emulated by opening a new file using mkstemp() and then immediately unlink()ed.

Connect the stream to the specified file descriptor. Note that error or not any passed file descriptor will be consumed (closed) by [Chain::new()].

Connect the stream to the specified file using the specified mode.

Connect the stream to the specified file. Note that error or not any passed file will be consumed (closed) by [Chain::new()].

Methods

impl PipeSetup
[src]

impl PipeSetup
[src]

Trait Implementations

impl Debug for PipeSetup
[src]

Formats the value using the given formatter. Read more

impl IntoPipeSetup for PipeSetup
[src]

Auto Trait Implementations

impl Send for PipeSetup

impl Sync for PipeSetup