Skip to content

Commit 1460ce5

Browse files
authored
bpo-31258: test_signal: call waitpid() to prevent zombie process (#3183)
1 parent cce1cb9 commit 1460ce5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Lib/test/test_signal.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@ def test_main(self):
185185
self.fail('Test deadlocked after %d seconds.' %
186186
self.MAX_DURATION)
187187

188+
# read the exit status to not leak a zombie process
189+
os.waitpid(child, 0)
190+
188191

189192
@unittest.skipIf(sys.platform == "win32", "Not valid on Windows")
190193
class BasicSignalTests(unittest.TestCase):

0 commit comments

Comments
 (0)