pub unsafe extern "C" fn xila_process_spawn(
process: *const Process,
directory: *const Directory,
path: *const c_char,
path_length: usize,
spawn: *const Spawn,
child: *mut *mut Child,
) -> StatusExpand description
Start an executable as a child of this process and return its handle.
The path names a file below the directory capability, which needs the READ right.
The host checks the execute permission as the calling process’s user, and the child
runs as the same user. The child gets an owned duplicate of each standard stream, a
copy of the home capability if any, the given arguments, and a copy of this
process’s environment unless the request gives an explicit one. Spawning
suspends the caller while the host reads the executable. Failures map to the
usual statuses: NotFound, PermissionDenied, ExecFormat for an image the host
cannot run, and OutOfMemory when the task table is full. Task manager errors use
the canonical I/O kind mapping (NoSpawnerAvailable is Unavailable,
InvalidSpawnerIdentifier is InvalidArgument). The
process must be the running process’s capability, otherwise the call returns
InvalidArgument. The handle is written only on success.
§Safety
Process and directory must be live capabilities, the path readable for its length, the request and everything it points to valid for the call, and the output writable.