DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=36903>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=36903 ------- Additional Comments From [EMAIL PROTECTED] 2005-10-06 16:01 ------- (In reply to comment #1) > Could it be that a process started by ant waits for standard input? > Does adding a redirector with an empty inputstring help? We use a fully automated build process, so am not aware of our processes waiting for standard input, but we use some third party tools which am not sure about. Yes, adding inputstring="" to java task makes processes downstream stop hanging, but why should this impact other processes? Removing fork="yes" from the java process has the same effect sometimes. But these are just workarounds. Narrowed down the hangs in our build process to two scenarios. One involves third party application (tomcat), the other does not. Am attaching a standalone test-case for the first scenario. Will attach the second scenario later; have not been able to make a reproducible standalone test-case for the other one yet. Have put together a standalone test case that hangs on ANT 1.6.{3,4,5}, but works on ANT 1.6.2. NOTE: 1. have observed that this test case hangs if ant is invoked via cygwin (bash) shell or a parent java process like Cruise Control (http://cruisecontrol.sourceforge.net). It works as is if run in DOS Shell. 2. test-case works in bash if you remove fork="yes" from the ListProperties java task 3. test-case works in bash if you add inputstring="" to the ListProperties java task Strange that making these changes to java task will affect completely unrelated processes downstream. 4. test-case works as is in bash or Cruise Control on ANT 1.6.2 STEPS: 1. Compile this java file into classes folder ListProperties.java ------------------- public class ListProperties { public static void main(String[] ignore) { System.getProperties().list(System.out); } } 2. Use this ANT file: test.xml -------- <project name="tests" default="test" basedir="."> <description> Tests build file </description> <property environment="system"/> <property name="classes" location="classes"/> <!-- classpath --> <path id="class.path"> <pathelement location="${classes}"/> </path> <target name="setup"> <java classname="ListProperties" classpathref="class.path" failonerror="true" fork="yes" dir="${basedir}"/> </target> <target name="test" depends="setup"> <exec executable="${system.CATALINA_HOME}/bin/shutdown.bat"> </exec> <parallel> <exec executable="${system.CATALINA_HOME}/bin/startup.bat"> </exec> <sequential> <echo message="Waiting for http://localhost:8080/tomcat- docs/index.html"/> <waitfor maxwait="3" maxwaitunit="minute" checkevery="3000" timeoutproperty="web.page.not.available"> <http url="http://localhost:8080/tomcat-docs/index.html"/> </waitfor> <exec executable="${system.CATALINA_HOME}/bin/shutdown.bat"> </exec> </sequential> </parallel> </target> </project> 3. Download and unzip jakarta-tomcat-5.0.28 http://mirrors.ccs.neu.edu/Apache/dist/jakarta/tomcat-5/v5.0.28/bin/jakarta- tomcat-5.0.28.zip 4. Configure bash environment; example: bash> export CATALINA_HOME=d:\\jakarta-tomcat-5.0.28 5. Run like this passing in your classes path: bash> ant -f test.xml -Dclasses=classes (Ignore exception thrown trying to stop tomcat since it is not running yet) Ant process will hang. Let it run for more than 5 minutes, exceeding the wait timeout; it is hanging somewhere. Also, open a web browser and paste in the http url. Web page opens up and is available. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]