You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
799 B
19 lines
799 B
6 years ago
|
diff --git a/Lib/test/test_thread.py b/Lib/test/test_thread.py
|
||
|
index 413889a..fb312aa 100644
|
||
|
--- a/Lib/test/test_thread.py
|
||
|
+++ b/Lib/test/test_thread.py
|
||
|
@@ -237,7 +237,12 @@ class TestForkInThread(unittest.TestCase):
|
||
|
if pid == 0: # child
|
||
|
os.close(self.read_fd)
|
||
|
os.write(self.write_fd, "OK")
|
||
|
- sys.exit(0)
|
||
|
+ # Exiting the thread normally in the child process can leave
|
||
|
+ # any additional threads (such as the one started by
|
||
|
+ # importing _tkinter) still running, and this can prevent
|
||
|
+ # the half-zombie child process from being cleaned up. See
|
||
|
+ # Issue #26456.
|
||
|
+ os._exit(0)
|
||
|
else: # parent
|
||
|
os.close(self.write_fd)
|
||
|
|