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 Tue, 20 Aug 2002 00:08:22 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.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://nagoya.apache.org/bugzilla/show_bug.cgi?id=5003

exec task does not return after executed command finished on Windows only





------- Additional Comments From nawkboy@yahoo.com  2002-08-20 00:08 -------
The patch (id=996J) did stop problems I had with execute hanging.  
Unfortunately the patch also causes the output of my cvs log command to be 
prematurely truncated.  Before applying the patch, my code would hang the 
second time I executed a CVS log command but all of the output made it to my 
client code's input buffer.

I made the additional following change:
The patch to PumpStreamHandler makes changes like:

while (inputThread.isAlive()) {
	inputThread.interrupt();
	inputThread.join(TIMEOUT);
}

I changed these to instead be:
		
if (inputThread.isAlive()) {
	inputThread.join(TIMEOUT);
	while (inputThread.isAlive()) {
		inputThread.interrupt();
		inputThread.join(TIMEOUT);
	}
}

>From reading the previous patches this seems to have been the intent of Adam 
Sotona all along.  He started out with something similar to this and then lost 
the initial wait in the later version.

Immediately interupting the thread is more likely to cause premature closing of 
the thread.  Thereby preventing the client code from obtaining all the output 
of the executed command.  (cvs log in my case)  At least with my additional 
change there is a better chance all the output is pushed into the client's 
input buffer.

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


Mime
View raw message