summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_thread.py
diff options
context:
space:
mode:
authorAmmar Askar <ammar_askar@hotmail.com>2017-08-09 08:51:43 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2017-08-09 08:51:43 (GMT)
commit88eee44a91c991dbbdf284fa220e2928b5de105c (patch)
tree51b75a14f2c8183ab234b3b5f42b8d8462357e6b /Lib/test/test_thread.py
parentc82b7f332aff606af6c9c163da75f1e86514125e (diff)
downloadcpython-88eee44a91c991dbbdf284fa220e2928b5de105c.zip
cpython-88eee44a91c991dbbdf284fa220e2928b5de105c.tar.gz
cpython-88eee44a91c991dbbdf284fa220e2928b5de105c.tar.bz2
bpo-31150: Wait for child process in test_forkinthread to avoid thread reaped warnings (#3032)
Diffstat (limited to 'Lib/test/test_thread.py')
-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",