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 5003] - exec task does not return after executed command finished on Windows only
Date Fri, 03 Dec 2004 11:03:33 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=5003>.
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=5003





------- Additional Comments From peterreilly@apache.org  2004-12-03 12:03 -------
Adam, I still do not follow.
Ant exec is not the same as just calling process.exec().
It's job is to start the process and handle it's input
and output <file descriptors|handles> and wait for it to finish.

One can use the "spawn" attribute to spawn off the process and
not care about it.

note, the notepad program is not the issue the follows also
works in unix:

public class Test {
    public static void main(String[] args) {
        try {
            Runtime.getRuntime().exec("emacs");
            System.out.println("finished");
            Thread.sleep(10 * 1000);
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
}

The parent process of the emacs process is the java program, and when it
dies, the parent process becomes the init process.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message