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 ExecuteJava.java
Date Fri, 05 Apr 2002 13:55:50 GMT
bodewig     02/04/05 05:55:50

  Modified:    src/main/org/apache/tools/ant/taskdefs ExecuteJava.java
  Log:
  Make not so strong, we don't really know whether we've managed to end
  the spawned thread.  Make the thread a daemon thread.
  
  Revision  Changes    Path
  1.20      +6 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/ExecuteJava.java
  
  Index: ExecuteJava.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/ExecuteJava.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- ExecuteJava.java	5 Apr 2002 12:56:34 -0000	1.19
  +++ ExecuteJava.java	5 Apr 2002 13:55:50 -0000	1.20
  @@ -139,6 +139,11 @@
                   run();
               } else {
                   thread = new Thread(this, "ExecuteJava");
  +                // if we run into a timout, the run-away thread shall not
  +                // make the VM run forever - if no timeout occurs, Ant's
  +                // main thread will still be there to let the new thread
  +                // finish
  +                thread.setDaemon(true);
                   Watchdog w = new Watchdog(timeout.longValue());
                   w.addTimeoutObserver(this);
                   synchronized (this) {
  @@ -148,7 +153,7 @@
                           wait();
                       } catch (InterruptedException e) {}
                       if (timedOut) {
  -                        project.log("Timeout: killed the sub-process",
  +                        project.log("Timeout: sub-process interrupted",
                                       Project.MSG_WARN); 
                       } else {
                           thread = 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