Exemple #1
0
 @Override
 public int waitFor() throws InterruptedException {
   if (exitValue == Integer.MIN_VALUE) {
     exitValue = CSystem.INSTANCE.pclose(fd);
     if (exitValue == -1) {
       throw new RuntimeException("Failed to close process.");
     }
   }
   return exitValue;
 }
Exemple #2
0
 private void doBuildCommand(final ForkerBuilder builder) {
   fd = CSystem.INSTANCE.popen(buildCommand(builder), builder.io() == IO.INPUT ? "r" : "w");
 }