summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmmar Askar <ammar_askar@hotmail.com>2017-08-09 14:59:22 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2017-08-09 14:59:21 (GMT)
commit4388b4257abf3b9c348cf4db8c6144dcc07f3e98 (patch)
treebd080d3ea9aab523936d1a8e7a2b04811ad0df0e
parentf3b891718e104b6e7018b58bbcd86421a2837fb8 (diff)
downloadcpython-4388b4257abf3b9c348cf4db8c6144dcc07f3e98.zip
cpython-4388b4257abf3b9c348cf4db8c6144dcc07f3e98.tar.gz
cpython-4388b4257abf3b9c348cf4db8c6144dcc07f3e98.tar.bz2
[3.6] bpo-31150: Wait for child process in test_forkinthread to avoid thread reaped warnings (#3041)
-rw-r--r--Lib/test/test_thread.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_thread.py b/Lib/test/test_thread.py
index 3909b75..2e2655a 100644
--- a/Lib/test/test_thread.py
+++ b/Lib/test/test_thread.py
@@ -239,6 +239,8 @@ class TestForkInThread(unittest.TestCase):
os._exit(0)
else: # parent
os.close(self.write_fd)
+ pid, status = os.waitpid(pid, 0)
+ self.assertEqual(status, 0)
thread.start_new_thread(thread1, ())
self.assertEqual(os.read(self.read_fd, 2), b"OK",