Thanks,
Carson
When the spawn'ed process dies interact will return. If you want the
script to exit at that point follow it with an exit. I.e.,
spawn /your/program
# do your login
interact
exit 1 ;# or some other suitable exit status
... or something simillar. Then have your executable that calls the
Expect script test the exit status to see if it should exit (or have it
exit too).
Michael