]> granicus.if.org Git - python/commitdiff
Try to fix test_signal breakages on Linux due to r61687. It appears that at
authorJeffrey Yasskin <jyasskin@gmail.com>
Fri, 21 Mar 2008 05:51:37 +0000 (05:51 +0000)
committerJeffrey Yasskin <jyasskin@gmail.com>
Fri, 21 Mar 2008 05:51:37 +0000 (05:51 +0000)
least two of the linux build bots aren't leaving zombie processes around for
os.waitpid to wait for, causing ECHILD errors. This would be a symptom of a bug
somewhere, but probably not in signal itself.

Lib/test/test_signal.py

index 76574afa859b256a071818a86f05cde76ce09f10..b0195d72110d395915fd99419d8895f59275707a 100644 (file)
@@ -44,9 +44,11 @@ class InterProcessSignalTests(unittest.TestCase):
         """Wait for child_pid to finish, ignoring EINTR."""
         while True:
             try:
-                pid, status = os.waitpid(child_pid, 0)
-                return status
+                os.waitpid(child_pid, 0)
+                return
             except OSError as e:
+                if e.errno == errno.ECHILD:
+                    return
                 if e.errno != errno.EINTR:
                     raise