Author: henrib
Date: Fri Sep 25 14:25:59 2009
New Revision: 818863

URL: http://svn.apache.org/viewvc?rev=818863&view=rev
Log:
On a Mac, the unit tests never finish. Culprit is InputStreamPumper which sets 
its stop member in the run method; however, run might really be executed after 
the stopProcessing method is called if the process thread completes before the 
InputStreamPumper starts.

Modified:
    
commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/InputStreamPumper.java

Modified: 
commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/InputStreamPumper.java
URL: 
http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/InputStreamPumper.java?rev=818863&r1=818862&r2=818863&view=diff
==============================================================================
--- 
commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/InputStreamPumper.java
 (original)
+++ 
commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/InputStreamPumper.java
 Fri Sep 25 14:25:59 2009
@@ -51,6 +51,7 @@
     public InputStreamPumper(final InputStream is, final OutputStream os) {
         this.is = is;
         this.os = os;
+        this.stop = false;
     }
 
 
@@ -59,8 +60,6 @@
      * soon as the input stream is closed or an error occurs.
      */
     public void run() {
-        stop = false;
-
         try {
             while (!stop) {
                 while (is.available() > 0 && !stop) {


Reply via email to