From 02eb1fcc6626b4bf6a315994ce58881aa5294e23 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Thu, 21 Aug 2008 12:20:17 +0000 Subject: [PATCH] add an FAQ entry for PR 34461 and friends git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@687724 13f79535-47bb-0310-9956-ffa450edef68 --- xdocs/faq.xml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/xdocs/faq.xml b/xdocs/faq.xml index 22c5326be..ed87a88ec 100644 --- a/xdocs/faq.xml +++ b/xdocs/faq.xml @@ -1368,6 +1368,37 @@ public void buildFinished(BuildEvent e) { + + <exec> causes other tasks to hang + or leads to strange behaviour of <input> + tasks. + + + +

When Ant forks a new process for example by using the + <exec>, <apply> + or <java> tasks, it will also start a + new thread reading from standard input and sending + everything that it has read to that process.

+ +

Unfortunately Ant has no way to know whether the forked + process is ever going to read any input, so it will start such + a thread even if the process doesn't need one.

+ +

This behaviour leads to strange side effects like the Ant + process being suspended when a build forking new process is + run as a background process on Unix-like systems or + <input> tasks requiring additional inputs + if they come after an <exec> task.

+ +

Fortunately there is a workaround for this, always specify + inputstring="" for + any <exec> task (or one of its sibblings) + if you know the forked process doesn't consume any + input.

+
+
+ Ant 1.7.0 doesn't build from sources without JUnit