From a1694b917eb1cbec2c952c1ff85490e95e5b31c4 Mon Sep 17 00:00:00 2001 From: Steve Loughran Date: Fri, 30 Nov 2001 20:43:03 +0000 Subject: [PATCH] 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 --- .../org/apache/tools/ant/taskdefs/Execute.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/main/org/apache/tools/ant/taskdefs/Execute.java b/src/main/org/apache/tools/ant/taskdefs/Execute.java index 0623d181e..c393d5f66 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Execute.java +++ b/src/main/org/apache/tools/ant/taskdefs/Execute.java @@ -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