waitForExitMaxMs

public abstract int waitForExitMaxMs(long maxWaitUntilReturning)

Blocks until the process terminates, or until the timeout elapses.

Return

the process exit code if it terminated within the timeout, or an implementation-defined sentinel value if still running when the timeout is reached

Parameters

maxWaitUntilReturning

maximum time to wait in milliseconds; a non-negative value

Throws

if the process was never started or start failed

if interrupted while waiting