Browse Source

new method, killedProcess() which returns true if there is a watchdog and it killed the process

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270055 13f79535-47bb-0310-9956-ffa450edef68
master
Steve Loughran 23 years ago
parent
commit
a1694b917e
1 changed files with 14 additions and 0 deletions
  1. +14
    -0
      src/main/org/apache/tools/ant/taskdefs/Execute.java

+ 14
- 0
src/main/org/apache/tools/ant/taskdefs/Execute.java View File

@@ -419,10 +419,24 @@ public class Execute {
exitValue = value;
}

/**
* query the exit value of the process.
* @return the exit value, 1 if the process was killed,
* or Project.INVALID if no exit value has been received
*/
public int getExitValue() {
return exitValue;
}

/**
* test for an untimely death of the process
* @return true iff a watchdog had to kill the process
* @since 1.5
*/
public boolean killedProcess() {
return watchdog!=null && watchdog.killedProcess();
}
/**
* Patch the current environment with the new values from the user.
* @return the patched environment


Loading…
Cancel
Save