commit | c0bc4eff5093bd4268cb3d02b9dca2fcbe7e59ca | [log] [tgz] |
---|---|---|
author | Benjamin Peterson <benjamin@python.org> | Mon Jun 16 19:39:18 2014 -0700 |
committer | Benjamin Peterson <benjamin@python.org> | Mon Jun 16 19:39:18 2014 -0700 |
tree | 9a2ee96173bee1404d002fe5e53c86fd6d2193aa | |
parent | 1a6561e2f593143565a6562e7818ea735d2b6790 [diff] [blame] |
avoid crashes and lockups from daemon threads during interpreter shutdown (#1856)
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 @@ PyThread_exit_thread(void) { dprintf(("PyThread_exit_thread called\n")); - if (!initialized) { + if (!initialized) exit(0); - } + pthread_exit(0); } #ifdef USE_SEMAPHORES