bpo-31258: test_signal: call waitpid() to prevent zombie process (#3183)

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 @@
                 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):