ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francis Galiegue <>
Subject Killing a forked <junit> task when sending SIGINT?
Date Thu, 19 Mar 2009 10:21:03 GMT

We want to optionally launch a debugger on junit testing. We do this by 
invoking the <junit> task as such:

<junit2 fork="true" printsummary="yes">
    <jvmarg value="-Djava.awt.headless=true"/>
    <jvmarg value="-Djava.awt.headlesslib=true"/>
    <jvmarg value="-Xdebug"/>
    <classpath refid=""/>
    <formatter type="xml"/>
    <batchtest todir="${testoutput}">
        <fileset refid="test.victims"/>

The problem is, whether Java 1.4 or 1.5 is used (1.4 is 1.4.2_19 and 1.5 is 
1.5.0_10, both from Sun), if I type C-c at the commande line to kill the ant 
task, the fork()ed Java is _not_ killed. I can check it by typing 
netstat -ltpn and seeing that the fork()ed process still listens on port 

By looking at the <java> task, it just looks like the <junit> task sets 
spawn="true". I'd like it to be false...

Is there any way that I can achieve $subject?

Francis Galiegue
Ingénieur système
Mob : +33 (0) 6 83 87 78 75
Tel : +33 (0) 1 78 94 55 52
40 avenue Raymond Poincaré
75116 Paris

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

View raw message