From 0d5e52d3469a310001afe50689f77ddba6d554d1 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Wed, 4 May 2011 20:02:30 +0200 Subject: Issue #1856: Avoid crashes and lockups when daemon threads run while the interpreter is shutting down; instead, these threads are now killed when they try to take the GIL. --- Python/thread_pthread.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Python/thread_pthread.h') diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h index ffc791c578e..6bc9d55781b 100644 --- a/Python/thread_pthread.h +++ b/Python/thread_pthread.h @@ -250,9 +250,9 @@ void PyThread_exit_thread(void) { dprintf(("PyThread_exit_thread called\n")); - if (!initialized) { + if (!initialized) exit(0); - } + pthread_exit(0); } #ifdef USE_SEMAPHORES -- cgit v1.2.3