Browse Source

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
master
Peter Donald 24 years ago
parent
commit
c1f1c3932c
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      proposal/myrmidon/src/java/org/apache/myrmidon/framework/exec/ProcessMonitor.java

+ 9
- 0
proposal/myrmidon/src/java/org/apache/myrmidon/framework/exec/ProcessMonitor.java View File

@@ -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.
*/


Loading…
Cancel
Save