Function nstd_sys::proc::nstd_proc_spawn
source · #[no_mangle]
pub unsafe extern "C" fn nstd_proc_spawn(
program: &NSTDStr,
args: &NSTDSlice,
vars: &NSTDSlice
) -> NSTDOptionalChildProcess
Available on crate feature
proc
only.Expand description
Spawns a new child process with the name program
and returns a handle to it.
§Parameters:
-
const NSTDStr *program
- A path to the program to run as a child process. -
const NSTDSlice *args
- A slice ofNSTDStr
arguments to pass to the program. -
const NSTDSlice *vars
- A slice ofNSTDStr[2]
key/value environment variables to give to the program.
§Returns
NSTDOptionalChildProcess child
- A handle to the new child process on success, or an
uninitialized “none” variant if spawning the child process fails.
§Safety
The user must ensure that all of program
, args
, and vars
and their data remain valid for
reads while this function is executing.