A good example is sending a request for a large directory listing (ls
or dir) to a spawned ftp/telnet session and trying to receive the
result. The spawned process dies, seemingly at random, in the middle of
reading the results.
I do not know the root cause for sure, but here is what I believe it
is:
When reading bytes from a spawned process, if Expect reads zero bytes
from its receive buffer it interpets this to mean EOF (end of file) and
responds by immediately closing the spawned process. Most importantly,
when this occurs you as a programmer have no way to catch this EOF and
prevent the connection from being closed. Believe me, many have tried..
This behaviour might make sense from some perspectives, and might even
make certain situations easier to code, I dont know for sure. But in
practice, it renders this Expect virtually unusable in all but the most
basic scripts and greatly limits the number of scenarios where it can
be used.
I see a lot of old threads where people were spending all sorts of time
looking through their code trying to make this work. Most of these
threads are old now, but I "Expect" that many people still rely on
ActiveTCL for their Win32 Expect needs even in 2006/2007.
I am not looking for "have you tried this?" "have you tried that?"
here-say responses about something you suspect "might" work because you
saw it once somewhere blah blah blah.
If you are interested in getting involved, please be a user or designer
of this particular Win32 ActiveState Expect and take the few minutes to
create a small test script for yourself to attempt to reproduce the
issue. Reply with the results. If it works for you, maybe we can figure
out why it works for you and does not for so many others. If you
experience the same issue, maybe we can collaborate or perhaps you know
of another possible root cause.
Thanks!
ivel...@hotmail.com wrote:
> If you are interested in getting involved, please be a user or designer
> of this particular Win32 ActiveState Expect and take the few minutes to
> create a small test script for yourself to attempt to reproduce the
> issue. Reply with the results.
How about posting a test case that fails, instead. Pick a public ftp site with
anon access that has big listings and post the script that it fails with.
- --
David Gravereaux <davy...@pobox.com> Have a cookie:->
And her face so fair
Stirr'd with her dream, as rose-leaves with the air.
-- Lord Byron (1788-1824)
-- Don Juan, Canto iv, Stanza 29
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
iD8DBQFFnLJVlZadkQh/RmERAlUAAJsGeXAhdkv+EY6Nh4oh9IbynrUfUACg1A+Z
QJ5QiPzqbHRFf1qphX+noMI=
=8jvb
-----END PGP SIGNATURE-----