jglick 2005/03/28 13:42:13
Modified: . Tag: ANT_16_BRANCH WHATSNEW
src/main/org/apache/tools/ant/taskdefs Tag: ANT_16_BRANCH
Execute.java
Log:
Stop a forked process if the thread running <java> is stopped. [merge]
PR: 31928
Revision Changes Path
No revision
No revision
1.503.2.209 +3 -0 ant/WHATSNEW
Index: WHATSNEW
===================================================================
RCS file: /home/cvs/ant/WHATSNEW,v
retrieving revision 1.503.2.208
retrieving revision 1.503.2.209
diff -u -r1.503.2.208 -r1.503.2.209
--- WHATSNEW 25 Mar 2005 12:29:22 -0000 1.503.2.208
+++ WHATSNEW 28 Mar 2005 21:42:13 -0000 1.503.2.209
@@ -141,6 +141,9 @@
Fixed bugs:
-----------
+* Killing a thread running <java fork="true"> (e.g. from an IDE) would
+ not stop the forked process. Bugzilla 31928.
+
* Programs run with <java fork="true"> can now accept standard input
from the Ant console. (Programs run with <java fork="false"> could
already do so.) Bugzilla 24918.
No revision
No revision
1.68.2.11 +4 -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.68.2.10
retrieving revision 1.68.2.11
diff -u -r1.68.2.10 -r1.68.2.11
--- Execute.java 9 Mar 2005 18:56:25 -0000 1.68.2.10
+++ Execute.java 28 Mar 2005 21:42:13 -0000 1.68.2.11
@@ -480,6 +480,10 @@
watchdog.checkException();
}
return getExitValue();
+ } catch (ThreadDeath t) {
+ // #31928: forcibly kill it before continuing.
+ process.destroy();
+ throw t;
} finally {
// remove the process to the list of those to destroy if the VM
exits
//
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]