]> granicus.if.org Git - python/commitdiff
- Issue #2113: Fix error in subprocess.Popen if the select system call is
authorGregory P. Smith <greg@mad-scientist.com>
Sun, 6 Jul 2008 07:16:40 +0000 (07:16 +0000)
committerGregory P. Smith <greg@mad-scientist.com>
Sun, 6 Jul 2008 07:16:40 +0000 (07:16 +0000)
  interrupted by a signal.

Lib/subprocess.py
Misc/NEWS

index 606559413ebbec7174e20925648fdf159d7b7174..35970f8c7e6a8e73462994c4f1edf711b18a0ae9 100644 (file)
@@ -1158,7 +1158,12 @@ class Popen(object):
 
             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,
index 715746c8747e3cc200a2e00327d6eb499361ea51..f50459c770559abc1528054398eeb89b500c22c3 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -59,6 +59,9 @@ Library
   urllib module in Python 3.0 to urllib.request, urllib.parse, and
   urllib.error.
 
+- Issue #2113: Fix error in subprocess.Popen if the select system call is
+  interrupted by a signal.
+
 Build
 -----