git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@677899 13f79535-47bb-0310-9956-ffa450edef68master
@@ -52,6 +52,15 @@ and you must not specify more than one mapper.</p> | |||||
<p>Note that you cannot interact with the forked program, the only way | <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> | 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> | <h3>Parameters</h3> | ||||
<table border="1" cellpadding="2" cellspacing="0"> | <table border="1" cellpadding="2" cellspacing="0"> | ||||
<tr> | <tr> | ||||
@@ -131,6 +131,15 @@ or the task will fail as follows: | |||||
</blockquote> | </blockquote> | ||||
</p> | </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> | <h3>Parameters</h3> | ||||
<table border="1" cellpadding="2" cellspacing="0"> | <table border="1" cellpadding="2" cellspacing="0"> | ||||
<tr> | <tr> | ||||
@@ -36,6 +36,16 @@ JVM. | |||||
sending input to it via the <code>input</code> and <code>inputstring</code> | sending input to it via the <code>input</code> and <code>inputstring</code> | ||||
attributes.</p> | 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> | <h3>Parameters</h3> | ||||
<table border="1" cellpadding="2" cellspacing="0"> | <table border="1" cellpadding="2" cellspacing="0"> | ||||
<tr> | <tr> | ||||
@@ -520,6 +520,22 @@ shell (of course unless called automatically from <code>ant.cmd</code>). It is t | |||||
<p>Scripts <code>envset.cmd</code> and <code>runrc.cmd</code> perform auxiliary tasks. All scripts | <p>Scripts <code>envset.cmd</code> and <code>runrc.cmd</code> perform auxiliary tasks. All scripts | ||||
have some documentation inside.</p> | 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> | <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 | <p>If you have installed Ant in the do-it-yourself way, Ant can be started | ||||
from one of two entry points:</p> | from one of two entry points:</p> | ||||
@@ -37,6 +37,7 @@ | |||||
<a href="running.html#sysprops">Java System Properties</a><br/> | <a href="running.html#sysprops">Java System Properties</a><br/> | ||||
<a href="running.html#cygwin">Cygwin Users</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#os2">OS/2 Users</a><br/> | ||||
<a href="running.html#background">Running "in the background"</a><br/> | |||||
</div> | </div> | ||||
<a href="running.html#viajava">Running Ant via Java</a><br/> | <a href="running.html#viajava">Running Ant via Java</a><br/> | ||||