summaryrefslogtreecommitdiffstats
path: root/Modules/signalmodule.c
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-04-27 17:20:48 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-04-27 17:20:48 (GMT)
commit4394e0db24f38250d487adcbd8b85f314cb86829 (patch)
tree780b649028ce241a21af7f595b84b6f8db1d719b /Modules/signalmodule.c
parent34b32d62f85f198ca0c92b367e04a08febb87532 (diff)
downloadcpython-4394e0db24f38250d487adcbd8b85f314cb86829.zip
cpython-4394e0db24f38250d487adcbd8b85f314cb86829.tar.gz
cpython-4394e0db24f38250d487adcbd8b85f314cb86829.tar.bz2
Issue #10517: After fork(), reinitialize the TLS used by the PyGILState_*
APIs, to avoid a crash with the pthread implementation in RHEL 5. Patch by Charles-François Natali.
Diffstat (limited to 'Modules/signalmodule.c')
-rw-r--r--Modules/signalmodule.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c
index f306bba..6f021e7 100644
--- a/Modules/signalmodule.c
+++ b/Modules/signalmodule.c
@@ -976,6 +976,7 @@ void
PyOS_AfterFork(void)
{
#ifdef WITH_THREAD
+ _PyGILState_Reinit();
PyEval_ReInitThreads();
main_thread = PyThread_get_thread_ident();
main_pid = getpid();