waitFor

fun waitFor(): Int(source)

Blocks the current thread until Process completion.

Return

The Process.exitCode

Throws


fun waitFor(duration: Duration): Int?(source)

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

Throws