Signature: awaitProcess(handle: int) -> int

Description: Waits for a spawned process to complete and returns its exit code. Blocks until the process finishes.

Parameters

Returns: int

Example

let exitCode = awaitProcess(processHandle)
print("Process exited with code: ${toString(exitCode)}")