Merge
authorRichard Oudkerk <shibturn@gmail.com>
Tue, 26 Feb 2013 13:00:15 +0000 (13:00 +0000)
committerRichard Oudkerk <shibturn@gmail.com>
Tue, 26 Feb 2013 13:00:15 +0000 (13:00 +0000)
1  2 
Lib/multiprocessing/forking.py
Lib/test/test_multiprocessing.py
Misc/NEWS

index c5501a2f75339356990c0756c2659774c20cfa26,8dc4b005fc44e3a6dd0a5120ce428606709890f4..0bb21c469d5edfecf2c7b50f5c8495bcb3f3507c
@@@ -102,19 -127,19 +103,24 @@@ if sys.platform != 'win32'
                  code = process_obj._bootstrap()
                  os._exit(code)
  
 +            # `w` will be closed when the child exits, at which point `r`
 +            # will become ready for reading (using e.g. select()).
 +            os.close(w)
 +            util.Finalize(self, os.close, (r,))
 +
          def poll(self, flag=os.WNOHANG):
              if self.returncode is None:
-                 try:
-                     pid, sts = os.waitpid(self.pid, flag)
-                 except os.error:
-                     # 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:
+                         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
Simple merge