ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/exec ProcessMonitor.java
Date Sun, 23 Dec 2001 05:30:03 GMT
donaldp     01/12/22 21:30:03

  Modified:    proposal/myrmidon/src/java/org/apache/myrmidon/framework/exec
                        ProcessMonitor.java
  Log:
  add a method to query whether process times out or terminated of natural causes.
  
  Revision  Changes    Path
  1.2       +10 -1     jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/exec/ProcessMonitor.java
  
  Index: ProcessMonitor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/exec/ProcessMonitor.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ProcessMonitor.java	2001/12/23 04:53:27	1.1
  +++ ProcessMonitor.java	2001/12/23 05:30:03	1.2
  @@ -20,7 +20,7 @@
    * It will also in the future do the same for stdin.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.1 $ $Date: 2001/12/23 04:53:27 $
  + * @version $Revision: 1.2 $ $Date: 2001/12/23 05:30:03 $
    */
   public class ProcessMonitor
       extends AbstractLogEnabled
  @@ -99,6 +99,15 @@
           m_output = output;
           m_error = error;
           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 );
       }
   
       /**
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message