ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional Cab.java
Date Fri, 18 Oct 2002 07:00:54 GMT
bodewig     2002/10/18 00:00:54

  Modified:    .        WHATSNEW
               src/main/org/apache/tools/ant/taskdefs/optional Cab.java
  Log:
  Avoid hanging listcab on large filesets (because writing the filelist
  blocks before listcab's output is being read).
  
  PR: 13546
  Submitted by:	Jim Newsham <newsham at hotu.com>
  
  Revision  Changes    Path
  1.302     +2 -0      jakarta-ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/WHATSNEW,v
  retrieving revision 1.301
  retrieving revision 1.302
  diff -u -r1.301 -r1.302
  --- WHATSNEW	10 Oct 2002 07:03:43 -0000	1.301
  +++ WHATSNEW	18 Oct 2002 07:00:53 -0000	1.302
  @@ -28,6 +28,8 @@
   * The "plain" <junit> <formatter> could throw a NullPointerException
     if an error occured in setUp.
   
  +* <cab> could hang listcab on large <fileset>s.
  +
   Other changes:
   --------------
   
  
  
  
  1.23      +4 -3      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/Cab.java
  
  Index: Cab.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/Cab.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- Cab.java	26 Sep 2002 08:13:58 -0000	1.22
  +++ Cab.java	18 Oct 2002 07:00:54 -0000	1.23
  @@ -266,9 +266,6 @@
                                              new String[] {"listcab"}, null,
                                              baseDir, true);
                   OutputStream out = p.getOutputStream();
  -                out.write(sb.toString().getBytes());
  -                out.flush();
  -                out.close();
   
                   // Create the stream pumpers to forward listcab's stdout and stderr to
the log
                   // note: listcab is an interactive program, and issues prompts for every
new line.
  @@ -281,6 +278,10 @@
                   // Pump streams asynchronously
                   (new Thread(outPump)).start();
                   (new Thread(errPump)).start();
  +
  +                out.write(sb.toString().getBytes());
  +                out.flush();
  +                out.close();
   
                   int result = -99; // A wild default for when the thread is interrupted
   
  
  
  

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