waitFor
Blocks the current thread until Process completion.
Return
The Process.exitCode
Throws
Blocks the current thread for the specified duration, or until Process.exitCode is available (i.e. the Process completed).
Return
The Process.exitCode, or null if duration is exceeded without Process completion.
Parameters
duration
the Duration to wait