public void waitFor(){
  checkStarted();
  try {
    if (myInputProcessor != null && myProcess != null) {
      myInputProcessor.process(myProcess.getOutputStream());
    }
  }
  finally {
    waitForProcess();
  }
}

public void waitFor ( ) { checkStarted ( ) ; try { if ( myInputProcessor != null && myProcess != null ) { myInputProcessor . process ( myProcess . getOutputStream ( ) ) ; } } finally { waitForProcess ( ) ; } }
wait for process termination
