protected boolean waitForProcess(Process process,long timeout,BuilderConfiguration configuration,BuildLogger logger) throws Exception {
  try {
    if (timeout > 0) {
      return process.waitFor(timeout,TimeUnit.SECONDS);
    }
 else {
      process.waitFor();
      return true;
    }
  }
 catch (  InterruptedException e) {
    Thread.interrupted();
    return false;
  }
 finally {
    process.destroyForcibly();
  }
}

protected boolean waitForProcess ( Process process , long timeout , BuilderConfiguration configuration , BuildLogger logger ) throws Exception { try { if ( timeout > 0 ) { return process . waitFor ( timeout , TimeUnit . SECONDS ) ; } else { process . waitFor ( ) ; return true ; } } catch ( InterruptedException e ) { Thread . interrupted ( ) ; return false ; } finally { process . destroyForcibly ( ) ; } }
wait for the build command ' s process to terminate .
