commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From patri...@apache.org
Subject cvs commit: jakarta-commons-sandbox/daemon/src/java/org/apache/commons/launcher LaunchTask.java
Date Fri, 19 Jul 2002 20:10:45 GMT
patrickl    2002/07/19 13:10:45

  Modified:    daemon/src/java/org/apache/commons/launcher LaunchTask.java
  Log:
  Fix bug where System.exit() was being called before allowing the StreamConnectors to flush
any of their unflushed output
  
  Revision  Changes    Path
  1.14      +11 -3     jakarta-commons-sandbox/daemon/src/java/org/apache/commons/launcher/LaunchTask.java
  
  Index: LaunchTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/daemon/src/java/org/apache/commons/launcher/LaunchTask.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- LaunchTask.java	19 Jul 2002 10:05:55 -0000	1.13
  +++ LaunchTask.java	19 Jul 2002 20:10:45 -0000	1.14
  @@ -599,9 +599,17 @@
                   }
               }
               if (filteredWaitForChild) {
  -                new StreamConnector(proc.getInputStream(), System.out).start();
  -                new StreamConnector(proc.getErrorStream(), System.err).start();
  -                new StreamConnector(System.in, proc.getOutputStream()).start();
  +                StreamConnector stdout =
  +                    new StreamConnector(proc.getInputStream(), System.out);
  +                StreamConnector stderr =
  +                    new StreamConnector(proc.getErrorStream(), System.err);
  +                StreamConnector stdin =
  +                    new StreamConnector(System.in, proc.getOutputStream());
  +                stdout.start();
  +                stderr.start();
  +                stdin.start();
  +                stdout.join();
  +                stderr.join();
                   proc.waitFor();
               }
               // Need to check if the launching process has stopped because
  
  
  

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


Mime
View raw message