Function unsafe_spawn

Source
pub unsafe fn unsafe_spawn(
    name: Option<&str>,
    path: &str,
    argv: *mut [&str],
    flags: SpawnFlags,
    priority: Option<ContextPriority>,
    stdin: Option<Ri>,
    stdout: Option<Ri>,
    stderr: Option<Ri>,
) -> Result<Pid, ErrorStatus>
Expand description

spawns a new process

§Arguments

  • stdin, stdout, stderr are the file descriptors of stdio, if None, they will be inherited from the parent
  • priority is the process’s default priority (that the threads, including the root one, will inherit by default), if set to None the behavior isn’t well defined, however for now it will default to a constant value

§Safety

  • argv must be valid pointers to a slice of slices of &str

  • argv will become invalid after use, using them is UB