[−][src]Struct libuv::handles::process::ProcessOptions
Options for spawning the process (passed to spawn()).
Fields
exit_cb: ExitCB<'static>
Called after the process exits.
file: &'a str
Path to program to execute.
args: &'a [&'a str]
Command line arguments. args[0] should be the path to the program. On Windows this uses CreateProcess which concatenates the arguments into a string this can cause some strange errors. See the note at windows_verbatim_arguments.
env: Option<&'a [&'a str]>
This will be set as the environ variable in the subprocess. If this is None then the parents environ will be used.
cwd: Option<&'a str>
If Some() this represents a directory the subprocess should execute in. Stands for current working directory.
flags: ProcessFlags
Various flags that control how spawn() behaves. See the definition of ProcessFlags
.
stdio: &'a [StdioContainer]
The stdio
field points to an array of StdioContainer structs that describe the file
descriptors that will be made available to the child process. The convention is that
stdio[0] points to stdin, fd 1 is used for stdout, and fd 2 is stderr.
Note that on windows file descriptors greater than 2 are available to the child process only if the child processes uses the MSVCRT runtime.
uid: Uid
Libuv can change the child process' user/group id. This happens only when the appropriate bits are set in the flags fields. This is not supported on windows; spawn() will fail and set the error to ENOTSUP.
gid: Gid
Libuv can change the child process' user/group id. This happens only when the appropriate bits are set in the flags fields. This is not supported on windows; spawn() will fail and set the error to ENOTSUP.
Implementations
impl<'a> ProcessOptions<'a>
[src]
pub fn new(args: &'a [&'a str]) -> ProcessOptions
[src]
Constructs a new ProcessOptions object. The args slice must have at least one member: the path to the program to execute. Any additional members of the slice will be passed as command line arguments.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for ProcessOptions<'a>
impl<'a> !Send for ProcessOptions<'a>
impl<'a> !Sync for ProcessOptions<'a>
impl<'a> Unpin for ProcessOptions<'a>
impl<'a> !UnwindSafe for ProcessOptions<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,