wait-for-process ( process -- status )
Operating system processes > The process lifecycle

Prev:process-running? ( process -- ? )
Next:kill-process ( process -- )


Vocabulary
io.launcher

Inputs and outputs
processa process
statusan object


Word description
If the process is still running, waits for it to exit, otherwise outputs the status code immediately. Can be called multiple times on the same process.

Notes
The status code is operating system specific; it may be an integer, or another object (the latter is the case on Unix if the process was killed by a signal). However, one cross-platform behavior code can rely on is that a status code of 0 indicates success.

Definition