[Python-checkins] r65475 - in python/branches/release25-maint: Lib/subprocess.py Misc/NEWS

gregory.p.smith python-checkins at python.org
Mon Aug 4 05:23:26 CEST 2008


Author: gregory.p.smith
Date: Mon Aug  4 05:23:25 2008
New Revision: 65475

Log:
(backport from trunk r64756)
Issue #2113: Fix error in subprocess.Popen if the select system call is
interrupted by a signal.


Modified:
   python/branches/release25-maint/Lib/subprocess.py
   python/branches/release25-maint/Misc/NEWS

Modified: python/branches/release25-maint/Lib/subprocess.py
==============================================================================
--- python/branches/release25-maint/Lib/subprocess.py	(original)
+++ python/branches/release25-maint/Lib/subprocess.py	Mon Aug  4 05:23:25 2008
@@ -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,

Modified: python/branches/release25-maint/Misc/NEWS
==============================================================================
--- python/branches/release25-maint/Misc/NEWS	(original)
+++ python/branches/release25-maint/Misc/NEWS	Mon Aug  4 05:23:25 2008
@@ -130,6 +130,10 @@
   argument in python 2.5, this broke code that subclassed Popen to include its
   own poll method.  Fixed my moving _deadstate to an _internal_poll method.
 
+- Issue #2113: Fix error in subprocess.Popen if the select system call is
+  interrupted by a signal.
+
+
 Extension Modules
 -----------------
 


More information about the Python-checkins mailing list