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/impl ProcessMonitor.java
Date Sun, 06 Jan 2002 01:40:29 GMT
donaldp     02/01/05 17:40:29

  Modified:    proposal/myrmidon/src/java/org/apache/myrmidon/framework/exec/impl
                        ProcessMonitor.java
  Log:
  Shutdown IO if it is supplied
  
  Revision  Changes    Path
  1.2       +10 -2     jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/exec/impl/ProcessMonitor.java
  
  Index: ProcessMonitor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/exec/impl/ProcessMonitor.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ProcessMonitor.java	30 Dec 2001 06:49:51 -0000	1.1
  +++ ProcessMonitor.java	6 Jan 2002 01:40:29 -0000	1.2
  @@ -10,6 +10,7 @@
   import java.io.IOException;
   import java.io.InputStream;
   import java.io.OutputStream;
  +import org.apache.avalon.excalibur.io.IOUtil;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   
   /**
  @@ -20,7 +21,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/30 06:49:51 $
  + * @version $Revision: 1.2 $ $Date: 2002/01/06 01:40:29 $
    */
   class ProcessMonitor
       extends AbstractLogEnabled
  @@ -59,7 +60,7 @@
       /**
        * Stream from which to read standard input.
        */
  -    private final InputStream m_input;
  +    private InputStream m_input;
   
       /**
        * Stream to write standard output to.
  @@ -135,6 +136,10 @@
                   //swallow it
               }
           }
  +
  +        IOUtil.shutdownStream( m_input );
  +        IOUtil.shutdownStream( m_output );
  +        IOUtil.shutdownStream( m_error );
       }
   
       /**
  @@ -196,6 +201,9 @@
               //thread being blocked. Probably need to write to
               //stdin in another thread
               //copy( m_input, m_process.getOutputStream() );
  +
  +            IOUtil.shutdownStream( m_input );
  +            m_input = null;
           }
       }
   
  
  
  

--
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