wait-for-process ( process -- status )
Operating system processes ยป Launching processes

Prev:run-detached ( desc -- process )
Next:<process-reader> ( desc encoding -- stream )


Vocabulary
io.launcher

Inputs
processa process


Outputs
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