https://issues.apache.org/bugzilla/show_bug.cgi?id=49490
Summary: Killed Ant process leaves forked java sub-processes
Product: Ant
Version: 1.8.1
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: minor
Priority: P2
Component: Core tasks
AssignedTo: [email protected]
ReportedBy: [email protected]
I already red a lot of similar issues but still don`t see a working fix or
workaround.
For example, this is my code:
<java classname="com.google.gwt.dev.Compiler" fork="true"
maxmemory="${config.gwt.javac.maxmemory}" dir="${basedir}" failonerror="true"
resultproperty="gwt.compile.error.code"
jvmargs="${config.gwt.javac.jvmargs}">
<arg line="-style ${config.gwt.style}" />
<arg line="-war ${work.web.gwt.web.main.gwt-generated.dir}" />
<arg line="${config.gwt.validateOnly}" />
<arg value="${gwt-class}" />
<classpath refid="gwt.libs.snapshot.classpath" />
<classpath refid="gwt.libs.classpath" />
<classpath path="${src.main.dir}" />
</java>
If I run my build, wait for GWT compilation to start and then press ctrl-c
(kill), Ant process exits but GWT compilation is still running. GWT compilation
like other tasks may take a lot of time and if I press ctrl-c that means I want
to abort whole build.
As understand this is related to shutdownhooks in Java. I see kind of their
implementation in ProcessDestroyer class which is used in Execute class which
is used from <java/> task, but seems it still is not working or doing something
else.
I know this must be possible couse I already had implemented something similar
in my tool which starts up Ant process. If I kill my tool, Ant process gets
killed too. Should I give a try?
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.