https://issues.apache.org/bugzilla/show_bug.cgi?id=50960

           Summary: read on System.in hangs for forked java task
           Product: Ant
           Version: 1.8.2
          Platform: Macintosh
            Status: NEW
          Severity: regression
          Priority: P2
         Component: Core tasks
        AssignedTo: [email protected]
        ReportedBy: [email protected]


I just started using Ant 1.8.2 as it was installed along with the latest Java
Update for the Mac (JavaForMacOSX10.6Update4). Projects that worked fine with
Ant 1.8.1 no longer work in 1.8.2. The problem seems to be that a Java task
that forks a jvm hangs when it tries to read from System.in. Has anyone else
seen this problem? 

Attached is a simple build.xml file that demonstrates the problem. It creates a
simple Java file that just calls readLine() and echos the input, compiles the
file, and runs it twice: once in a non-forked JVM, which works fine, and again
in a forked JVM, which hangs.

-- Ron --

Here is a sample output:

> ant 
Buildfile: /Users/Ron/Development/Spots/tmp/ant-test/build.xml 

compile: 
   [echo]  
   [echo] ant.version      = Apache Ant(TM) version 1.8.2 compiled on December
20 2010 
   [echo] ant.home         = /usr/share/ant 
   [echo] ant.library.dir  = /usr/share/ant/lib 
   [echo] ant.java.version = 1.6 
   [echo]    
  [javac] Compiling 1 source file to /Users/Ron/Development/Spots/tmp/ant-test 

good: 
   [echo] This will work: calling Java with fork=false 
   [java]  
   [java] Please enter some text and hit return: 
asdf 
   [java] Text entered = asdf 

bad: 
   [echo] This will hang: calling Java with fork=true 
   [java]  
   [java] Please enter some text and hit return: 
asdf 
ddfd 
C-c C-c

---------------------------------------

On Mar 23, 2011, at 1:57 PM, Nicolas Lalevée wrote:

I can reproduce it locally. Could you please fill a bugzilla bug report [1],
I'll look deeper into it.

Nicolas

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

Reply via email to