bpo-31150: Wait for child process in test_forkinthread to avoid threa… · python/cpython@88eee44 (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Commit 88eee44

ammaraskarvstinner

authored and

committed

bpo-31150: Wait for child process in test_forkinthread to avoid thread reaped warnings (#3032)

File tree

1 file changed

lines changed

1 file changed

lines changed

Original file line number Diff line number Diff line change
@@ -239,6 +239,8 @@ def thread1():
239 239 os._exit(0)
240 240 else: # parent
241 241 os.close(self.write_fd)
242 +pid, status = os.waitpid(pid, 0)
243 +self.assertEqual(status, 0)
242 244
243 245 thread.start_new_thread(thread1, ())
244 246 self.assertEqual(os.read(self.read_fd, 2), b"OK",