From c1f1c3932cbcc6cda05854792d377134f35c9246 Mon Sep 17 00:00:00 2001 From: Peter Donald Date: Sun, 23 Dec 2001 05:30:03 +0000 Subject: [PATCH] add a method to query whether process times out or terminated of natural causes. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270352 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/myrmidon/framework/exec/ProcessMonitor.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/framework/exec/ProcessMonitor.java b/proposal/myrmidon/src/java/org/apache/myrmidon/framework/exec/ProcessMonitor.java index 9b1e74b10..f1a69519d 100644 --- a/proposal/myrmidon/src/java/org/apache/myrmidon/framework/exec/ProcessMonitor.java +++ b/proposal/myrmidon/src/java/org/apache/myrmidon/framework/exec/ProcessMonitor.java @@ -101,6 +101,15 @@ public class ProcessMonitor m_timeout = timeout; } + /** + * Utility method to check if process timed out. + * Only valid after run() has exited. + */ + public boolean didProcessTimeout() + { + return ( m_state == STATE_TERMINATED ); + } + /** * Thread method to monitor the state of the process. */