ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Conor MacNeill <>
Subject Re: cvs commit: jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs
Date Fri, 05 Apr 2002 13:44:42 GMT
Stefan Bodewig wrote:

> On 5 Apr 2002, <> wrote:
>>  timeout support for <java>
> This has a couple of side effects that I want your opinion on before I
> close the bug.
> timeout for forked java has been trivial, but I had to change
> ExecuteJava considerably to add it for the in-VM mode.
> The main change is that Ant will now run the class in a separate
> thread, if a timeout value has been specified.  I'm not sure whether
> our log system can deal with it (it may receive output from a thread
> that is not associated with a task).

It will treat this as non-task output and log as if generated by the project 
object. It would be possible to add a method to project to inform it about which 
task is associated with a new thread. This is currently done in the taskStarted 

> If timeout has been triggered, all ExecuteJava does right now is to
> interrupt() the spawned thread - which means it will not do too much
> for run-away threads.  stop() or even destroy() look more than a
> little dangerous in this context.
> But then again, run-away threads without this timeout feature would
> make Ant hang anyway.Timeout: killed the sub-process

Yes, at least Ant will end and and clean it up then. Perhaps the message

Timeout: killed the sub-process

should be a little bit less definitive, perhaps

Timeout: sub-process interrupted.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message