Clarification of Question by
bjschnei-ga
on
16 Jul 2004 20:25 PDT
I wrote a simple test program that excepted data, and echoed it
back...that worked fine. i changed the process to /usr/bin/telnet, and
as an argument passed it localhost which i have found some confusing
results.
When using telnet as the code is now, I get the expected data, which
ends with a login prompt -> but there is an extended delay. If i then
try to putData, supplying the username, i get the ERROR_NO_MORE_FILES
if i change getData to return 1 character at a time, and in the middle
of getting characters, make a call to putData, i don't get the error
-> haven't played with it enought to see what is causing this
behavior..getting kind of frustrated with it so i needed a brake..i.e
google answers..but anyway..what appears to be happening here, is that
ReadToEnd is not returning until telnet app ends(telnet must be timing
out)..and then when i try later write to it, it fails...not sure why..
in anycase, reading one char at a time with /bin/login results in no
data, and i can't send any either...
playing with /bin/login, i have concluded that the only way i can run
it from an existing shell(xterm) is by using the command: exec
/bin/login ...which really doesn't help much because i can't call exec
from my web service....