Author: bodewig
Date: Fri Jul 18 06:09:30 2008
New Revision: 677899
URL: http://svn.apache.org/viewvc?rev=677899&view=rev
Log:
some notes on running Ant as a background process. PR 34461.
Modified:
ant/core/trunk/docs/manual/CoreTasks/apply.html
ant/core/trunk/docs/manual/CoreTasks/exec.html
ant/core/trunk/docs/manual/CoreTasks/java.html
ant/core/trunk/docs/manual/running.html
ant/core/trunk/docs/manual/runninglist.html
Modified: ant/core/trunk/docs/manual/CoreTasks/apply.html
URL:
http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/CoreTasks/apply.html?rev=677899&r1=677898&r2=677899&view=diff
==============================================================================
--- ant/core/trunk/docs/manual/CoreTasks/apply.html (original)
+++ ant/core/trunk/docs/manual/CoreTasks/apply.html Fri Jul 18 06:09:30 2008
@@ -52,6 +52,15 @@
<p>Note that you cannot interact with the forked program, the only way
to send input to it is via the input and inputstring attributes.</p>
+<h4><a name="background">Running Ant as a background process on
+ Unix(-like) systems</a></h4>
+
+<p>If you run Ant as a background process (like <code>ant &</code>)
+ and use the <code><apply></code> task with <code>spawn</code>
+ set to <code>false</code>, you must provide explicit input to the
+ forked process or Ant will be suspended because it tries to read
+ from the standard input.</p>
+
<h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
Modified: ant/core/trunk/docs/manual/CoreTasks/exec.html
URL:
http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/CoreTasks/exec.html?rev=677899&r1=677898&r2=677899&view=diff
==============================================================================
--- ant/core/trunk/docs/manual/CoreTasks/exec.html (original)
+++ ant/core/trunk/docs/manual/CoreTasks/exec.html Fri Jul 18 06:09:30 2008
@@ -131,6 +131,15 @@
</blockquote>
</p>
+<h4><a name="background">Running Ant as a background process on
+ Unix(-like) systems</a></h4>
+
+<p>If you run Ant as a background process (like <code>ant &</code>)
+ and use the <code><exec></code> task with <code>spawn</code>
+ set to <code>false</code>, you must provide explicit input to the
+ forked process or Ant will be suspended because it tries to read
+ from the standard input.</p>
+
<h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
Modified: ant/core/trunk/docs/manual/CoreTasks/java.html
URL:
http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/CoreTasks/java.html?rev=677899&r1=677898&r2=677899&view=diff
==============================================================================
--- ant/core/trunk/docs/manual/CoreTasks/java.html (original)
+++ ant/core/trunk/docs/manual/CoreTasks/java.html Fri Jul 18 06:09:30 2008
@@ -36,6 +36,16 @@
sending input to it via the <code>input</code> and <code>inputstring</code>
attributes.</p>
+<h4><a name="background">Running Ant as a background process on
+ Unix(-like) systems</a></h4>
+
+<p>If you run Ant as a background process (like <code>ant &</code>)
+ and use the <code><java></code> task with <code>spawn</code>
+ set to <code>false</code> and <code>fork</code>
+ to <code>true</code>, you must provide explicit input to the forked
+ process or Ant will be suspended because it tries to read from the
+ standard input.</p>
+
<h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
Modified: ant/core/trunk/docs/manual/running.html
URL:
http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/running.html?rev=677899&r1=677898&r2=677899&view=diff
==============================================================================
--- ant/core/trunk/docs/manual/running.html (original)
+++ ant/core/trunk/docs/manual/running.html Fri Jul 18 06:09:30 2008
@@ -520,6 +520,22 @@
<p>Scripts <code>envset.cmd</code> and <code>runrc.cmd</code> perform
auxiliary tasks. All scripts
have some documentation inside.</p>
+<h2><a name="background">Running Ant as a background process on
+ Unix(-like) systems</a></h2>
+
+<p>If you start Ant as a background process (like in <code>ant
+ &</code>) and the build process creates another process, Ant will
+ immediately try to read from standard input, which in turn will
+ most likely suspend the process. In order to avoid this, you must
+ redirect Ant's standard input or explicitly provide input to each
+ spawned process via the input related attributes of the
+ corresponding tasks.</p>
+
+<p>Tasks that create such new processes
+ include <code><exec></code>, <code><apply></code>
+ or <code><java></code> when the <code>fork</code> attribute is
+ <code>true</code>.</p>
+
<h2><a name="viajava">Running Ant via Java</a></h2>
<p>If you have installed Ant in the do-it-yourself way, Ant can be started
from one of two entry points:</p>
Modified: ant/core/trunk/docs/manual/runninglist.html
URL:
http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/runninglist.html?rev=677899&r1=677898&r2=677899&view=diff
==============================================================================
--- ant/core/trunk/docs/manual/runninglist.html (original)
+++ ant/core/trunk/docs/manual/runninglist.html Fri Jul 18 06:09:30 2008
@@ -37,6 +37,7 @@
<a href="running.html#sysprops">Java System Properties</a><br/>
<a href="running.html#cygwin">Cygwin Users</a><br/>
<a href="running.html#os2">OS/2 Users</a><br/>
+ <a href="running.html#background">Running "in the background"</a><br/>
</div>
<a href="running.html#viajava">Running Ant via Java</a><br/>