Author: bodewig
Date: Thu Aug 21 05:20:17 2008
New Revision: 687724
URL: http://svn.apache.org/viewvc?rev=687724&view=rev
Log:
add an FAQ entry for PR 34461 and friends
Modified:
ant/core/trunk/xdocs/faq.xml
Modified: ant/core/trunk/xdocs/faq.xml
URL:
http://svn.apache.org/viewvc/ant/core/trunk/xdocs/faq.xml?rev=687724&r1=687723&r2=687724&view=diff
==============================================================================
--- ant/core/trunk/xdocs/faq.xml (original)
+++ ant/core/trunk/xdocs/faq.xml Thu Aug 21 05:20:17 2008
@@ -1368,6 +1368,37 @@
</faqsection>
<faqsection title="Known Problems">
+ <faq id="input-makes-exec-hang">
+ <question><code><exec></code> causes other tasks to hang
+ or leads to strange behaviour of <code><input></code>
+ tasks.</question>
+
+ <answer>
+
+ <p>When Ant forks a new process for example by using the
+ <code><exec></code>, <code><apply></code>
+ or <code><java></code> tasks, it will also start a
+ new thread reading from standard input and sending
+ everything that it has read to that process.</p>
+
+ <p>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.</p>
+
+ <p>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
+ <code><input></code> tasks requiring additional inputs
+ if they come after an <code><exec></code> task.</p>
+
+ <p>Fortunately there is a workaround for this, always specify
+ <code>inputstring=""</code> for
+ any <code><exec></code> task (or one of its sibblings)
+ if you know the forked process doesn't consume any
+ input.</p>
+ </answer>
+ </faq>
+
<faq id="170-requires-junit">
<question>Ant 1.7.0 doesn't build from sources without
JUnit</question>