B20.1: Problem with expect (NT)

Giovanni COSENZA Giovanni.Cosenza@alcatel.fr
Fri May 21 02:13:00 GMT 1999

I'm using the DejaGnu program and it works well but with some command it
jams and it does not give back the hand.

I have tried to simplify the source and to detail the problem and this
is the result.

The following program works fine.
It has to be executed under cygwin "sh" or "bash" in the following way :

$ expect test.exp

--------------------- TEST.EXP ----------------------------------
# Test.exp
spawn /bin/sh
set prompt "EUREKA"
send "export PS1=\"${prompt}\"\n"
expect {
    $prompt {
        puts "PROMPT"

expect $prompt


----------------------- END TET.EXP

But if you add one or more characters (> 161 chars.)  in the SEND string
the expect program jams.

Is it normal ?
Is it possible to execute command with more than 162 chars.?
Is it a buffer overflow problem?

I'd like to resolve this problem because most command I use are very


More information about the Cygwin mailing list