summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_thread.py
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-03-08 07:07:28 (GMT)
committerMartin Panter <vadmium+py@gmail.com>2016-03-08 07:07:28 (GMT)
commit20c8cd997458b0313b2a13c94de0889a4a7f1c80 (patch)
tree7f0618db4234f800fdbd3af2534149a30d7cfb58 /Lib/test/test_thread.py
parentb5805b567fcbc64501a09335547da314e105f639 (diff)
downloadcpython-20c8cd997458b0313b2a13c94de0889a4a7f1c80.zip
cpython-20c8cd997458b0313b2a13c94de0889a4a7f1c80.tar.gz
cpython-20c8cd997458b0313b2a13c94de0889a4a7f1c80.tar.bz2
Issue #26456: Force all child threads to terminate in TestForkInThread
Diffstat (limited to 'Lib/test/test_thread.py')
-rw-r--r--Lib/test/test_thread.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/test/test_thread.py b/Lib/test/test_thread.py
index b056039..b466138 100644
--- a/Lib/test/test_thread.py
+++ b/Lib/test/test_thread.py
@@ -233,7 +233,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)