summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_thread.py
diff options
context:
space:
mode:
authorAmmar Askar <ammar_askar@hotmail.com>2017-08-09 14:54:53 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2017-08-09 14:54:53 (GMT)
commit425680bbd2dc14ef8dc5d1928f44fc7cc43018c4 (patch)
tree5ee7e4375ca72b7f99740d48c13d578dc7d35133 /Lib/test/test_thread.py
parent56e162ad5c5d3effe9b4f05d0179e1b6a2a2d9b8 (diff)
downloadcpython-425680bbd2dc14ef8dc5d1928f44fc7cc43018c4.zip
cpython-425680bbd2dc14ef8dc5d1928f44fc7cc43018c4.tar.gz
cpython-425680bbd2dc14ef8dc5d1928f44fc7cc43018c4.tar.bz2
[2.7] bpo-31150: Wait for child process in test_forkinthread to avoid thread reaped warnings (#3042)
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 2f9abe0..c8caa5d 100644
--- a/Lib/test/test_thread.py
+++ b/Lib/test/test_thread.py
@@ -245,6 +245,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), "OK",