Function wasmer_wasix::syscalls::wasix::proc_spawn::proc_spawn

source ·
pub fn proc_spawn<M: MemorySize>(
    ctx: FunctionEnvMut<'_, WasiEnv>,
    name: WasmPtr<u8, M>,
    name_len: M::Offset,
    chroot: Bool,
    args: WasmPtr<u8, M>,
    args_len: M::Offset,
    preopen: WasmPtr<u8, M>,
    preopen_len: M::Offset,
    stdin: StdioMode,
    stdout: StdioMode,
    stderr: StdioMode,
    working_dir: WasmPtr<u8, M>,
    working_dir_len: M::Offset,
    ret_handles: WasmPtr<ProcessHandles, M>,
) -> Result<Errno, WasiError>
Expand description

Spawns a new process within the context of this machine

§Parameters

  • name - Name of the process to be spawned
  • chroot - Indicates if the process will chroot or not
  • args - List of the arguments to pass the process (entries are separated by line feeds)
  • preopen - List of the preopens for this process (entries are separated by line feeds)
  • stdin - How will stdin be handled
  • stdout - How will stdout be handled
  • stderr - How will stderr be handled
  • working_dir - Working directory where this process should run (passing ‘.’ will use the current directory)

§Return

Returns a bus process id that can be used to invoke calls