[2.7] bpo-31150: Wait for child process in test_forkinthread to avoid… · python/cpython@425680b (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Commit 425680b

ammaraskarvstinner

authored and

committed

[2.7] bpo-31150: Wait for child process in test_forkinthread to avoid thread reaped warnings (#3042)

File tree

1 file changed

lines changed

1 file changed

lines changed

Original file line number Diff line number Diff line change
@@ -245,6 +245,8 @@ def thread1():
245 245 os._exit(0)
246 246 else: # parent
247 247 os.close(self.write_fd)
248 +pid, status = os.waitpid(pid, 0)
249 +self.assertEqual(status, 0)
248 250
249 251 thread.start_new_thread(thread1, ())
250 252 self.assertEqual(os.read(self.read_fd, 2), "OK",