public ExternalProcessResult awaitTerminationAndResult(int timeoutMs,boolean destroyOnError) throws InterruptedException, TimeoutException, OperationCancellation, IOException {
  awaitTermination(timeoutMs,destroyOnError);
  return new ExternalProcessResult(process.exitValue(),getStdOutBytes(),getStdErrBytes());
}

public ExternalProcessResult awaitTerminationAndResult ( int timeoutMs , boolean destroyOnError ) throws InterruptedException , TimeoutException , OperationCancellation , IOException { awaitTermination ( timeoutMs , destroyOnError ) ; return new ExternalProcessResult ( process . exitValue ( ) , getStdOutBytes ( ) , getStdErrBytes ( ) ) ; }
awaits for successful process termination , as well as successful termination of reader threads , throws an exception otherwise ( and destroys the process ) .
