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