>>>>> "Ken" == Ken Raeburn via RT writes: Ken> Could you send (or attach in RT) the test script? If we can't figure Ken> this out here, we should report it to Don Libes and see if he knows Ken> anything. Sun knows about this problem. It's Bug ID 4927647 in their database, "pty loses last output before close/exit". My test script follows: for { set i 1 } { 1 } { incr i } { spawn echo foobarbaz expect { "foobarbaz" { puts "ok" expect eof wait } eof { puts "$i passes" wait exit 1 } } }