Struct rustrt::rtio::ProcessConfig[src]
pub struct ProcessConfig<'a> {
pub program: &'a CString,
pub args: &'a [CString],
pub env: Option<&'a [(CString, CString)]>,
pub cwd: Option<&'a CString>,
pub stdin: StdioContainer,
pub stdout: StdioContainer,
pub stderr: StdioContainer,
pub extra_io: &'a [StdioContainer],
pub uid: Option<uint>,
pub gid: Option<uint>,
pub detach: bool,
}Data needed to spawn a process. Serializes the std::io::process::Command
builder.
Fields
program | Path to the program to run. |
args | Arguments to pass to the program (doesn't include the program itself). |
env | Optional environment to specify for the program. If this is None, then it will inherit the current process's environment. |
cwd | Optional working directory for the new process. If this is None, then the current directory of the running process is inherited. |
stdin | Configuration for the child process's stdin handle (file descriptor 0).
This field defaults to |
stdout | Configuration for the child process's stdout handle (file descriptor 1).
This field defaults to |
stderr | Configuration for the child process's stdout handle (file descriptor 2).
This field defaults to |
extra_io | Any number of streams/file descriptors/pipes may be attached to this
process. This list enumerates the file descriptors and such for the
process to be spawned, and the file descriptors inherited will start at
3 and go to the length of this array. The first three file descriptors
(stdin/stdout/stderr) are configured with the |
uid | Sets the child process's user id. This translates to a |
gid | Similar to |
detach | If true, the child process is spawned in a detached state. On unix, this means that the child is the leader of a new process group. |