spawn (Expect)

term

networkingprogramming

Kept in this browser · My desk

The Expect command that starts a program on a pseudo-terminal, connects its input and output to the script, and makes it the current process, the one expect and send talk to.

It sets the variable spawn_id and returns the process id. A program that cannot be executed is reported at the next expect, as if it had printed the error; a spawn inside a procedure needs global spawn_id to be seen outside it (expect(1)).

Also known as: spawn, spawn_id, expect spawn

← Back to S Back to the glossary