- Issue #2113: Fix error in subprocess.Popen if the select system call is
interrupted by a signal.
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index 6065594..35970f8 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -1158,7 +1158,12 @@
input_offset = 0
while read_set or write_set:
- rlist, wlist, xlist = select.select(read_set, write_set, [])
+ try:
+ rlist, wlist, xlist = select.select(read_set, write_set, [])
+ except select.error, e:
+ if e.args[0] == errno.EINTR:
+ continue
+ raise
if self.stdin in wlist:
# When select has indicated that the file is writable,