}
protected ExecutionResult waitForStop(boolean expectFailure) {
ExecHandle execHandle = getExecHandle();
ExecResult execResult = execHandle.waitForFinish();
execResult.rethrowFailure(); // nop if all ok
String output = getStandardOutput();
String error = getErrorOutput();
boolean didFail = execResult.getExitValue() != 0;