timeout (Expect)
termKept in this browser · My desk
The variable, 10 seconds unless the script sets it, that limits how long each expect waits for a pattern before it gives up.
-1 means no limit, and -timeout N overrides it for one expect. The clock starts when the expect starts and only exp_continue restarts it: output that matches nothing does not. When it runs out, an arm for the timeout keyword runs; with no such arm Expect takes the implicit null action, returns as if nothing had gone wrong, and the script's next line runs, which is the cause of most Expect scripts that fail without saying so. It is unrelated to the timeout pattern of interact, which measures idle time.
Also known as: set timeout, set timeout -1, expect timeout, implicit null action