try-process ( desc -- )
Operating system processes ยป Launching processes

Prev:run-processes ( descs -- processes )
Next:run-detached ( desc -- process )


Vocabulary
io.launcher

Inputs
desca launch descriptor


Outputs
None

Word description
Launches a process and waits for it to complete. If it exits with a non-zero status code, throws a process-failed error.

Examples
USING: continuations io.launcher prettyprint ; [ "i-dont-exist" try-process ] [ ] recover .
T{ process-failed { process T{ process { command "i-dont-exist" } { environment H{ } } { environment-mode +append-environment+ } { group +same-group+ } { status 255 } } } }


See also
run-process, run-processes, run-detached

Definition