strange expect script behavior, or am i misunderstanding expect scripting?

Hello to all...this is my first post (so please go easy). :slight_smile:

I feel pretty solid at expect scripting, but I'm running into an issue that I'm not able to wrap my head around. I wrote a script that is a little advanced for logging into a remote Linux machine and changing text in a file using sed. What I'm trying to do is set the stty echo and stty -echo command several times in the script to show or not show user input (for things like passwords etc). Instead, I get a buffer overflow whenever I try to unset the stty output (i first set it with stty -echo then later with stty echo). Has anyone else experienced this? Thanks for any help!

I'm not an expect expert, but stty should be no problem. You probably have a bug somewhere else. The only thing with stty is that you're supposed to use the builtin in stty:
Do not do this: exec stty -echo
Do this: stty -echo

It says here, in my expect book, that the reason is that stty is not standard. I have found stty to be standard for stuff like this, but I would follow the book's technique anyway.

Sure nuf...this is a bug. For future ref, here is the system OS and version numbers:

SUSE LINUX 11.0
Linux HOSTNAME 2.6.25.18-0.2-pae #1 SMP 2008-10-21 16:30:26 +0200 i686 i686 i386 GNU/Linux
expect version 5.44.1.5