Skip to content

Commit 4388b42

Browse files
ammaraskarvstinner
authored andcommitted
[3.6] bpo-31150: Wait for child process in test_forkinthread to avoid thread reaped warnings (#3041)
1 parent f3b8917 commit 4388b42

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Lib/test/test_thread.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,8 @@ def thread1():
239239
os._exit(0)
240240
else: # parent
241241
os.close(self.write_fd)
242+
pid, status = os.waitpid(pid, 0)
243+
self.assertEqual(status, 0)
242244

243245
thread.start_new_thread(thread1, ())
244246
self.assertEqual(os.read(self.read_fd, 2), b"OK",

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy