]> granicus.if.org Git - python/commitdiff
Merge
authorRichard Oudkerk <shibturn@gmail.com>
Tue, 26 Feb 2013 13:11:11 +0000 (13:11 +0000)
committerRichard Oudkerk <shibturn@gmail.com>
Tue, 26 Feb 2013 13:11:11 +0000 (13:11 +0000)
1  2 
Lib/multiprocessing/forking.py
Lib/test/test_multiprocessing.py
Misc/NEWS

index d3e7a10656298b83f936ff027e084230907d18c9,0bb21c469d5edfecf2c7b50f5c8495bcb3f3507c..7bda412e8dffad3d8efb313c8b39a4d433df0e0a
@@@ -109,12 -110,17 +110,17 @@@ if sys.platform != 'win32'
  
          def poll(self, flag=os.WNOHANG):
              if self.returncode is None:
-                 try:
-                     pid, sts = os.waitpid(self.pid, flag)
-                 except OSError:
-                     # Child process not yet created. See #1731717
-                     # e.errno == errno.ECHILD == 10
-                     return None
+                 while True:
+                     try:
+                         pid, sts = os.waitpid(self.pid, flag)
 -                    except os.error as e:
++                    except OSError as e:
+                         if e.errno == errno.EINTR:
+                             continue
+                         # Child process not yet created. See #1731717
+                         # e.errno == errno.ECHILD == 10
+                         return None
+                     else:
+                         break
                  if pid == self.pid:
                      if os.WIFSIGNALED(sts):
                          self.returncode = -os.WTERMSIG(sts)
Simple merge
diff --cc Misc/NEWS
index 03d4b94866584e7063d8dc67ef9c06e00ad42c00,76074e168dc57f9d5a59ebacb5fbc0cdea95b408..8917b53a2a690a428956175ba894ae3746cea4f0
+++ b/Misc/NEWS
@@@ -270,9 -191,8 +270,11 @@@ Core and Builtin
  Library
  -------
  
+ - Issue #17018: Make Process.join() retry if os.waitpid() fails with EINTR.
 +- Issue #17197: profile/cProfile modules refactored so that code of run() and
 +  runctx() utility functions is not duplicated in both modules.
 +
  - Issue #14720: sqlite3: Convert datetime microseconds correctly.
    Patch by Lowe Thiderman.