[Python-checkins] bpo-31258: test_signal: call waitpid() to prevent zombie process (#3183)
Victor Stinner
webhook-mailer at python.org
Tue Aug 22 10:51:12 EDT 2017
https://github.com/python/cpython/commit/1460ce5a9325690d8a1913c296a9bba437ff0f39
commit: 1460ce5a9325690d8a1913c296a9bba437ff0f39
branch: 2.7
author: Victor Stinner <victor.stinner at gmail.com>
committer: GitHub <noreply at github.com>
date: 2017-08-22T16:51:09+02:00
summary:
bpo-31258: test_signal: call waitpid() to prevent zombie process (#3183)
files:
M Lib/test/test_signal.py
diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py
index 27054f17ba7..5cff13a0dff 100644
--- a/Lib/test/test_signal.py
+++ b/Lib/test/test_signal.py
@@ -185,6 +185,9 @@ def test_main(self):
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):
More information about the Python-checkins
mailing list