diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-06-17 02:39:18 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-06-17 02:39:18 (GMT) |
commit | c0bc4eff5093bd4268cb3d02b9dca2fcbe7e59ca (patch) | |
tree | 9a2ee96173bee1404d002fe5e53c86fd6d2193aa /Python/thread_pthread.h | |
parent | 1a6561e2f593143565a6562e7818ea735d2b6790 (diff) | |
download | cpython-c0bc4eff5093bd4268cb3d02b9dca2fcbe7e59ca.zip cpython-c0bc4eff5093bd4268cb3d02b9dca2fcbe7e59ca.tar.gz cpython-c0bc4eff5093bd4268cb3d02b9dca2fcbe7e59ca.tar.bz2 |
avoid crashes and lockups from daemon threads during interpreter shutdown (#1856)
Diffstat (limited to 'Python/thread_pthread.h')
-rw-r--r-- | Python/thread_pthread.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h index c9ed796..0c1fdfe 100644 --- a/Python/thread_pthread.h +++ b/Python/thread_pthread.h @@ -242,9 +242,9 @@ void PyThread_exit_thread(void) { dprintf(("PyThread_exit_thread called\n")); - if (!initialized) { + if (!initialized) exit(0); - } + pthread_exit(0); } #ifdef USE_SEMAPHORES |