ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs Execute.java
Date Thu, 01 Apr 2004 19:11:02 GMT
mbenson     2004/04/01 11:11:02

  Modified:    .        WHATSNEW CONTRIBUTORS
               src/main/org/apache/tools/ant/taskdefs Execute.java
  Log:
  I/O-intensive processes hung when started by Execute.spawn()
  PR: 23893/26852.
  Submitted by: Daniel Spilker
  
  Revision  Changes    Path
  1.579     +3 -0      ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.578
  retrieving revision 1.579
  diff -u -r1.578 -r1.579
  --- WHATSNEW	1 Apr 2004 13:06:45 -0000	1.578
  +++ WHATSNEW	1 Apr 2004 19:11:02 -0000	1.579
  @@ -23,6 +23,9 @@
   
   * <junit> and <assertions> are working together. Bugzilla report 27218
   
  +* I/O-intensive processes hung when executed via <exec spawn="true">.
  +  Bugzilla reports 23893/26852.
  +
   
   Other changes:
   --------------
  
  
  
  1.6       +1 -0      ant/CONTRIBUTORS
  
  Index: CONTRIBUTORS
  ===================================================================
  RCS file: /home/cvs/ant/CONTRIBUTORS,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- CONTRIBUTORS	31 Mar 2004 14:20:18 -0000	1.5
  +++ CONTRIBUTORS	1 Apr 2004 19:11:02 -0000	1.6
  @@ -30,6 +30,7 @@
   Cyrille Morvan
   Dale Anson
   Dan Armbrust
  +Daniel Spilker
   Danno Ferrin
   Davanum Srinivas
   David A. Herman
  
  
  
  1.77      +13 -0     ant/src/main/org/apache/tools/ant/taskdefs/Execute.java
  
  Index: Execute.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Execute.java,v
  retrieving revision 1.76
  retrieving revision 1.77
  diff -u -r1.76 -r1.77
  --- Execute.java	30 Mar 2004 23:22:14 -0000	1.76
  +++ Execute.java	1 Apr 2004 19:11:02 -0000	1.77
  @@ -17,6 +17,7 @@
   
   package org.apache.tools.ant.taskdefs;
   
  +import java.io.OutputStream;
   import java.io.BufferedReader;
   import java.io.ByteArrayOutputStream;
   import java.io.File;
  @@ -509,6 +510,18 @@
                       Project.MSG_VERBOSE);
               }
           }
  +
  +        OutputStream dummyOut = new OutputStream() {
  +            public void write(int b) throws IOException {
  +            }
  +        };
  +
  +        ExecuteStreamHandler streamHandler = new PumpStreamHandler(dummyOut);
  +        streamHandler.setProcessErrorStream(process.getErrorStream());
  +        streamHandler.setProcessOutputStream(process.getInputStream());
  +        streamHandler.start();
  +        process.getOutputStream().close();
  +
           project.log("spawned process " + process.toString(), Project.MSG_VERBOSE);
       }
   
  
  
  

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


Mime
View raw message