diff options
-rw-r--r-- | pexpect/pexpect.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pexpect/pexpect.py b/pexpect/pexpect.py index 349ef2f..3a88aa4 100644 --- a/pexpect/pexpect.py +++ b/pexpect/pexpect.py @@ -227,6 +227,7 @@ class spawn: raise ExceptionPexpect ('This file descriptor cannot be closed because it was not created by spawn. The original creator is responsible for closing it.') self.flush() os.close (self.child_fd) + os.waitpid (self.pid, 0) self.child_fd = -1 self.__child_fd_owner = None |