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 1034] - Telnet is not properly executing a command
Date Tue, 27 Nov 2001 17:35:36 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=1034>.
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=1034

Telnet is not properly executing a command





------- Additional Comments From necrotech@geocities.com  2001-11-27 09:35 -------
I have found that you need to write additional code to ensure that the command 
you executed FINISHES before disconnecting. By default the telnet task executes 
a command and then immediately disconnects, killing your tar process 
mid-stream. I think your telnet server kills all tasks upon disconnect, and that 
could be causing your problem.

My workaround was something like this:

<write string="tar --extract --gunzip --file=fullmealdeal.tar.gz; echo 
alldone"/>
<read>alldone</read>
<write string="echo ">
<read>alldone</read>
<write string="echo ">

You have to read the string 'alldone' twice, because the first time around it'll 
get read because the server is echoing back the string you sent. The SECOND time 
you read the string, it'll have been sent from the telnet server after the echo 
command actually executes.

Try it - I used this technique and it worked. You may need to tweak it a bit, 
but the idea is there.

--
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