You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2008/08/21 14:20:18 UTC

svn commit: r687724 - /ant/core/trunk/xdocs/faq.xml

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>&lt;exec&gt;</code> causes other tasks to hang
+        or leads to strange behaviour of <code>&lt;input&gt;</code>
+        tasks.</question>
+
+      <answer>
+
+        <p>When Ant forks a new process for example by using the
+          <code>&lt;exec&gt;</code>, <code>&lt;apply&gt;</code>
+          or <code>&lt;java&gt;</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>&lt;input&gt;</code> tasks requiring additional inputs
+          if they come after an <code>&lt;exec&gt;</code> task.</p>
+
+        <p>Fortunately there is a workaround for this, always specify
+          <code>inputstring=""</code> for
+          any <code>&lt;exec&gt;</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>