ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 34461] New: - problems with core <java fork="true"> task
Date Thu, 14 Apr 2005 21:11:18 GMT
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=34461>.
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=34461

           Summary: problems with core <java fork="true"> task
           Product: Ant
           Version: 1.6.3beta1
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: ggimler@gmail.com
                CC: bodewig@apache.org


I've noticed a subtle bug in the way ant 1.6.3 now forks off java processes. 
I've compared the behavior between 1.6.2 and 1.6.3.

My environment is red hat enterprise linux 3 with java 1.4.2. (see example code
at the bottom).  I run with the following command...

1) ant &

This executes an application that performs a sleep, then prints out
some text, followed by a wait call that should hang indefinitely.

In the background it will run and you will see the print statement in
1.6.2 but not 1.6.3.  If you hit enter you'll see that the job goes
into the "Stopped" state in 1.6.3.  If you put it back into the
foreground it will finish executing, it's only when you have it as a
background process that it misbehaves.


--- CODE STARTS HERE ----

// Test.java

public class Test {
 
        public static void main(String args[] ){
                try {
                        Thread.sleep(5000);
                } catch(InterruptedException ie) {}
                System.out.println("Running...");
                try {
                synchronized(Test.class) {
                        Test.class.wait();
                }
                } catch (InterruptedException ie) {}
 
        }
}

----------------build.xml-------------------------------------------

<project name="java-problem" default="java-problem" basedir=".">
        <target name="java-problem">
                <java classname="Test" fork="true">
                        <classpath>
                                <pathelement path="${basedir}"/>
                        </classpath>
                </java>
        </target> 
</project>

-- 
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: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message