ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 46305] Hung forked JVM when reading from standard input
Date Fri, 24 Sep 2010 18:15:00 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=46305

--- Comment #5 from flushdia <flushdia@gmail.com> 2010-09-24 14:14:56 EDT ---
I am experiencing similar issues when using forked <java> followed by <input>.
Let me explain the details.

Consider the following snippet of Ant XML code:

  <target name="java-input">
    <java classname="org.apache.tools.ant.launch.Launcher" fork="true">
      <classpath>
        <pathelement location="${ant.home}/lib/ant-launcher.jar" />
      </classpath>
      <arg value="-buildfile" />
      <arg file="echo.xml" />
      <arg value="echo" />
    </java>
    <input message="Do you want to proceed" validargs="y,n" defaultvalue="y"
addproperty="proceed" />
    <echo>User selected [${proceed}]</echo>
  </target>

When running this target, <input> asks for input two times (not one) and
accepts second entry as actual input.

Issue is not reproduced when running with fork="true" and spawn="true" OR with
fork="false".

Issue can be fixed by adding inputstring="" to <java>, but what if <java> has
to accept some input as well?

Shouldn't Ant workaround such situation?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Mime
View raw message