public boolean waitFor(final long msTimeout) {
    try {
      return waitForUnsafe(msTimeout);
    }
    catch (InterruptedException e) {
      throw new ProcessCanceledException(e);
    }
  }
public boolean waitFor(final long msTimeout)