diff Lib/subprocess.py @ 48163:641edee4fcb1 2.5

(backport from trunk r64756) Issue #2113: Fix error in subprocess.Popen if the select system call is interrupted by a signal.
author Gregory P. Smith <greg@mad-scientist.com>
date Mon, 04 Aug 2008 03:23:25 +0000
parents dc850da04bd5
children 787b969d37f0
line wrap: on
line diff
--- a/Lib/subprocess.py	Mon Aug 04 00:45:34 2008 +0000
+++ b/Lib/subprocess.py	Mon Aug 04 03:23:25 2008 +0000
@@ -1153,7 +1153,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,