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 28565] - org.apache.tools.ant.taskdefs.Execute
Date Tue, 27 Apr 2004 12:43:58 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=28565>.
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=28565

org.apache.tools.ant.taskdefs.Execute

gus_goose@canada.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         OS/Version|All                         |Solaris
           Priority|Other                       |Low



------- Additional Comments From gus_goose@canada.com  2004-04-27 12:43 -------
Hi again.

Firstly, have a look again at the finally {} block in
AbstractCVSTask.runCommand() It is NOT closing the streams created by the
java.lang.Process class (which are actually InputStreams), but is closing the
streams (OutputStreams) to which the contents of the Process's Input streams are
pumped.

Secondly, after further research, I have found that my problem is specific to
Solaris (I tried Linux at home later). So, I believe it is related to Java bug
4637504  ( http://developer.java.sun.com/developer/bugParade/bugs/4637504.html )

Basically, for all other OS's, the Process cleans up properly on termination. On
Solaris, it doesn't.

Regardless, the work-around proposed in the above Java bug is safe for all OS's,
and it's use should be considered in Ant. It is the same work-around that I have
found in my experiments (and suggested first time around), that the three
Process Streams (STDERR, STDOUT, and STDIN) should be explicitly closed before
returning from Execute.execute().

I am going to leave status as re-opened, but the powers that be may want to
close this as too-low-to-worry-about. In that case, feel free to close it
(again), and I will leave it that way. On the other hand, with JDK1.4.1, on
Solaris, it is very easy to run out of file descriptors, and a very easy fix in
Ant will prevent that.

For the record, attached is the output of the build in "my" environment.

gus

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


Mime
View raw message