You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Francis Galiegue <fg...@one2team.com> on 2009/03/19 11:21:03 UTC

Killing a forked task when sending SIGINT?

Hello,

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"/>
    <jvmarg 
value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=11555"/>
    <classpath refid="junit.run.classpath"/>
    <formatter type="xml"/>
    <batchtest todir="${testoutput}">
        <fileset refid="test.victims"/>
    </batchtest>
</junit2>
----

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 
11555.

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
ONE2TEAM
Ingénieur système
Mob : +33 (0) 6 83 87 78 75
Tel : +33 (0) 1 78 94 55 52
fge@one2team.com
40 avenue Raymond Poincaré
75116 Paris

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org