Interact
What's happening
When you invoke interact there's two implied spawn_id's and four I/O actions being applied. With nothing else said, the expect process will read from $user_spawn_id and pass that onto $spawn_id and then read from $spawn_id and pass the data onto $user_spawn_id. Just like you'd expect!
In the diagram there are some extra labels which we'll discuss next.
That's useful but not very exciting. What is a bit more interesting is Don Libes' kibitz script which has two users sharing a shell, ie. both users can type input and both users see the output. That sounds a bit more fun.
However, re-implementing it is not so straightforward.
Document Actions