Struct subprocess::PopenConfig
[−]
[src]
pub struct PopenConfig {
pub stdin: Redirection,
pub stdout: Redirection,
pub stderr: Redirection,
pub detached: bool,
pub executable: Option<OsString>,
// some fields omitted
}Options for Popen::create.
When constructing PopenConfig, always use the Default trait,
such as:
Popen::create(argv, PopenConfig { stdout: Redirection::Pipe, detached: true, // ... other fields you want to override ... ..Default::default() })
This ensures that fields added later do not break existing code.
An alternative to using PopenConfig directly is creating
processes using Exec, a builder for Popen.
Fields
stdin: Redirection
How to configure the executed program's standard input.
stdout: Redirection
How to configure the executed program's standard output.
stderr: Redirection
How to configure the executed program's standard error.
detached: bool
Whether the Popen instance is initially detached.
executable: Option<OsString>
Executable to run.
If provided, this executable will be used to run the program
instead of argv[0]. However, argv[0] will still be passed
to the subprocess, which will see that as argv[0]. On some
Unix systems, ps will show the string passed as argv[0],
even though executable is actually running.
Methods
impl PopenConfig[src]
fn try_clone(&self) -> IoResult<PopenConfig>
Clone the underlying PopenConfig, or return an error.
This is guaranteed not to fail as long as no
Redirection::File variant is used for one of the standard
streams. Otherwise, it fails if File::try_clone fails on
one of the Redirections.
Trait Implementations
impl Debug for PopenConfig[src]
impl Default for PopenConfig[src]
fn default() -> PopenConfig
Returns the "default value" for a type. Read more