summaryrefslogtreecommitdiff
path: root/Python/thread_pthread.h
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-05-04 20:02:30 +0200
committerAntoine Pitrou <solipsis@pitrou.net>2011-05-04 20:02:30 +0200
commit0d5e52d3469a310001afe50689f77ddba6d554d1 (patch)
tree0427334f46907890af771153a28f2c39441a8d89 /Python/thread_pthread.h
parente548f5a0018fb44ed3a2a365ff0c8c87e397eedd (diff)
downloadcpython-git-0d5e52d3469a310001afe50689f77ddba6d554d1.tar.gz
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.
Diffstat (limited to 'Python/thread_pthread.h')
-rw-r--r--Python/thread_pthread.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h
index ffc791c578..6bc9d55781 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