summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-08-22 14:51:09 (GMT)
committerGitHub <noreply@github.com>2017-08-22 14:51:09 (GMT)
commit1460ce5a9325690d8a1913c296a9bba437ff0f39 (patch)
tree6555af9404025414a8196da4261609f013628848 /Lib
parentcce1cb9180dd9143c5b2ce094a52c555b42c7aa8 (diff)
downloadcpython-1460ce5a9325690d8a1913c296a9bba437ff0f39.zip
cpython-1460ce5a9325690d8a1913c296a9bba437ff0f39.tar.gz
cpython-1460ce5a9325690d8a1913c296a9bba437ff0f39.tar.bz2
bpo-31258: test_signal: call waitpid() to prevent zombie process (#3183)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_signal.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py
index 27054f1..5cff13a 100644
--- a/Lib/test/test_signal.py
+++ b/Lib/test/test_signal.py
@@ -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):