summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pexpect/__init__.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pexpect/__init__.py b/pexpect/__init__.py
index 942d19f..7a45bfc 100644
--- a/pexpect/__init__.py
+++ b/pexpect/__init__.py
@@ -1645,8 +1645,9 @@ class spawn(object):
data = self.__interact_read(self.child_fd)
except OSError as e:
# The subprocess may have closed before we get to reading it
- if e.errno != errno.EIO:
- raise
+ if e.errno == errno.EIO:
+ break # EOF on linux
+ raise
if output_filter:
data = output_filter(data)
if self.logfile is not None: