From the man page of expect: > Both expect and interact will detect when the current process exits > and implicitly do a close. But if you kill the process by, say, "exec > kill $pid", you will need to explicitly call close. Fixes #3569