process.wait
process.wait
Function
Wait for the started child process to exit.
Syntax
process(program).child().wait()
Parameters
No parameters.
Return value
| Type | Description |
|---|---|
| Int/Empty | Returns the exit code if there is a child process; returns Empty if there is no child process handle. |
Example
result = process('cmd').args(['/C', 'exit 0']).child().wait() // Output: 0 print result
Notes
- This method blocks the current process until the child process exits.