public int waitFor(final long timeout, final boolean throwOnTimeout) throws InterruptedException {
    checkStarting();
    final Thread thread = getThread();
    thread.join(timeout);
    synchronized (exitValue) {
      if (throwOnTimeout) {
        checkStopped();
      }
      return exitValue.get();
    }
  }
Wraps spawned {@link Process} to capture output and provide interaction with the process.

@since GemFire 4.1.1
geode-junit/src/main/java/org/apache/geode/test/process/ProcessWrapper.java