Skip to main content

spawn_start

Function spawn_start 

Source
pub fn spawn_start(opts: SpawnOptions) -> Result<RunningProcess, CoreError>
Expand description

Start spawning a process and return a monitor handle.

This initializes the pipes and starts the process, but does not block. Use RunningProcess::register_with_reactor, RunningProcess::handle_reactor_event, RunningProcess::io_done, and RunningProcess::into_output_parts to drive captured stdio without exposing internal drain state.

ยงErrors

  • EACCES: Permission denied for the executable.
  • EINVAL: Invalid spawn options (e.g. background capture without wait).
  • EMFILE: Process limit on open file descriptors hit.
  • ENOENT: The executable was not found.
  • ENOMEM: Insufficient memory to spawn the process.