]> granicus.if.org Git - python/commitdiff
bpo-31258: test_signal: call waitpid() to prevent zombie process (#3183)
authorVictor Stinner <victor.stinner@gmail.com>
Tue, 22 Aug 2017 14:51:09 +0000 (16:51 +0200)
committerGitHub <noreply@github.com>
Tue, 22 Aug 2017 14:51:09 +0000 (16:51 +0200)
Lib/test/test_signal.py

index 27054f17ba7085e97050738383d38be8b816fd47..5cff13a0dfff263d5ee3f35b22c046b02a1d3c82 100644 (file)
@@ -185,6 +185,9 @@ class InterProcessSignalTests(unittest.TestCase):
                 self.fail('Test deadlocked after %d seconds.' %
                           self.MAX_DURATION)
 
+            # read the exit status to not leak a zombie process
+            os.waitpid(child, 0)
+
 
 @unittest.skipIf(sys.platform == "win32", "Not valid on Windows")
 class BasicSignalTests(unittest.TestCase):