summaryrefslogtreecommitdiff
path: root/Lib/subprocess.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/subprocess.py')
-rw-r--r--Lib/subprocess.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index bdf85fc108..ce08f83939 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -476,7 +476,7 @@ def _eintr_retry_call(func, *args):
while True:
try:
return func(*args)
- except OSError, e:
+ except (OSError, IOError) as e:
if e.errno == errno.EINTR:
continue
raise
@@ -743,10 +743,10 @@ class Popen(object):
raise
self.stdin.close()
elif self.stdout:
- stdout = self.stdout.read()
+ stdout = _eintr_retry_call(self.stdout.read)
self.stdout.close()
elif self.stderr:
- stderr = self.stderr.read()
+ stderr = _eintr_retry_call(self.stderr.read)
self.stderr.close()
self.wait()
return (stdout, stderr)