It's all about the answers!

Ask a question

Abandoned ANT build leaves child processes on Windows


Mark Frost (122) | asked Aug 04 '11, 9:50 a.m.
We have a build definition on Windows that uses ANT, and spawns child processes. If the build is abandoned, child processes can be left running.
This is a big problem for us as the leftover process is running within the build directory, and so causes all subsequent builds to fail because the directory cannot be deleted.

What can be done (either with the build engine, or within ANT) to ensure that if users abandon a build no child processes are left running?
I'd prefer not to disallow 'abandon' as if it worked correctly it would be useful - this build can run for several hours.

The problematic child is a .cmd script, launched from an ANT exec task like this:

  <exec dir="${basedir}/../output" executable="${basedir}/fvt/fvt.cmd" timeout="10800000">

<arg value="..." />
<arg value="${basedir}\..\output" />
</exec>

One answer



permanent link
Brent Ulbricht (2.5k11) | answered Aug 04 '11, 12:43 p.m.
JAZZ DEVELOPER
We have a build definition on Windows that uses ANT, and spawns child processes. If the build is abandoned, child processes can be left running.
This is a big problem for us as the leftover process is running within the build directory, and so causes all subsequent builds to fail because the directory cannot be deleted.

What can be done (either with the build engine, or within ANT) to ensure that if users abandon a build no child processes are left running?
I'd prefer not to disallow 'abandon' as if it worked correctly it would be useful - this build can run for several hours.

The problematic child is a .cmd script, launched from an ANT exec task like this:

  <exec>

<arg>
<arg>
</exec>


Hi,

This RTC task has some information about abandoning builds and what happens with child processes. This topic has some information about a new property to waitFor instead of destroy. The new property is available in 3.0.1 and would work for build participants based off the command line participant (ex. Ant build participant).

Brent Ulbricht
RTC Build Lead

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.