[Python-checkins] [2.7] bpo-31150: Wait for child process in test_forkinthread to avoid thread reaped warnings (#3042)
Victor Stinner
webhook-mailer at python.org
Wed Aug 9 10:54:57 EDT 2017
https://github.com/python/cpython/commit/425680bbd2dc14ef8dc5d1928f44fc7cc43018c4
commit: 425680bbd2dc14ef8dc5d1928f44fc7cc43018c4
branch: 2.7
author: Ammar Askar <ammar_askar at hotmail.com>
committer: Victor Stinner <victor.stinner at gmail.com>
date: 2017-08-09T16:54:53+02:00
summary:
[2.7] bpo-31150: Wait for child process in test_forkinthread to avoid thread reaped warnings (#3042)
files:
M Lib/test/test_thread.py
diff --git a/Lib/test/test_thread.py b/Lib/test/test_thread.py
index 2f9abe078fc..c8caa5ddff0 100644
--- a/Lib/test/test_thread.py
+++ b/Lib/test/test_thread.py
@@ -245,6 +245,8 @@ def thread1():
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",
More information about the Python-checkins
mailing list