summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-04-27 17:30:16 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-04-27 17:30:16 (GMT)
commit9ea1c8d7d73aea2990adab20e144827f268eef89 (patch)
treece3df8b4c5ba01595489bf5aa2fdbbc8669fdd8f /Modules
parent2356659f343523336724860263fdc41d74590b42 (diff)
parent0c759febb660ad3dabc976383e24c28658dfda39 (diff)
downloadcpython-9ea1c8d7d73aea2990adab20e144827f268eef89.zip
cpython-9ea1c8d7d73aea2990adab20e144827f268eef89.tar.gz
cpython-9ea1c8d7d73aea2990adab20e144827f268eef89.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')
-rw-r--r--Modules/signalmodule.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c
index d34f132..00a83b4 100644
--- a/Modules/signalmodule.c
+++ b/Modules/signalmodule.c
@@ -991,6 +991,7 @@ void
PyOS_AfterFork(void)
{
#ifdef WITH_THREAD
+ _PyGILState_Reinit();
PyEval_ReInitThreads();
main_thread = PyThread_get_thread_ident();
main_pid = getpid();