summaryrefslogtreecommitdiffstats
path: root/Python/thread_pthread.h
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-05-04 18:04:29 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-05-04 18:04:29 (GMT)
commitfc20b0c65c446f79e39d006f3cffed03aa745380 (patch)
treed26d9bdfcce057847cc8b878621ac59ad547c695 /Python/thread_pthread.h
parentc17c6d95cf989a89d77ab4a655599531479bd268 (diff)
parent0d5e52d3469a310001afe50689f77ddba6d554d1 (diff)
downloadcpython-fc20b0c65c446f79e39d006f3cffed03aa745380.zip
cpython-fc20b0c65c446f79e39d006f3cffed03aa745380.tar.gz
cpython-fc20b0c65c446f79e39d006f3cffed03aa745380.tar.bz2
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 7d36b92..40ebaf6 100644
--- a/Python/thread_pthread.h
+++ b/Python/thread_pthread.h
@@ -244,9 +244,9 @@ void
PyThread_exit_thread(void)
{
dprintf(("PyThread_exit_thread called\n"));
- if (!initialized) {
+ if (!initialized)
exit(0);
- }
+ pthread_exit(0);
}
#ifdef USE_SEMAPHORES