Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Treatment spawnOnce

process/exec::spawnOnce


Parameters

↳ var command: Command (process/command::Command)
↳ var environment: Option<Environment> = _ (process/environment::Environment)

Inputs

⇥ executor: Block<Executor> (process/exec::Executor)
⇥ launch: Block<void>
⇥ stdin: Stream<byte>

Outputs

↦ completed: Block<void>
↦ error: Block<string>
↦ exit: Block<Option<i32>>
↦ failed: Block<void>
↦ finished: Block<void>
↦ started: Block<void>
↦ stderr: Stream<byte>
↦ stdout: Stream<byte>


Spawn a single command on an executor with stdio streams, triggered by a launch signal.

Like execOnce but also connects stdin, stdout, and stderr streams to the process. command is spawned with the optional environment on the provided executor when launch fires. started is emitted when the process begins. completed is emitted on success with exit holding the return code; failed and error are emitted if the executor cannot spawn the command. finished is always emitted at the end.