Enum memfd_exec::Stdio
source · pub enum Stdio {
Inherit,
Null,
MakePipe,
Fd(FileDesc),
}Expand description
Description of a stdio stream for a child process
Variants§
Inherit
Inherit the parent’s stdio stream
Null
Use a null stream, like /dev/null
MakePipe
Use a pipe to the input or output of the child process
Fd(FileDesc)
Use an existing file descriptor as the stdio stream
Implementations§
source§impl Stdio
impl Stdio
pub fn to_child_stdio( &self, readable: bool ) -> Result<(ChildStdio, Option<AnonPipe>)>
sourcepub fn piped() -> Stdio
pub fn piped() -> Stdio
Create a pipe for this file descriptor and use it in the child process as
the given file descriptor to facilitate input or output redirection. See
MemFdExecutable::stdin for an example.