diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-04-27 17:28:05 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-04-27 17:28:05 (GMT) |
commit | 0c759febb660ad3dabc976383e24c28658dfda39 (patch) | |
tree | 665621563310f3c1b81062b65c149722e3c85a67 /Modules/signalmodule.c | |
parent | 43ae619925cbcee7b59c3c370829a053fef40acb (diff) | |
download | cpython-0c759febb660ad3dabc976383e24c28658dfda39.zip cpython-0c759febb660ad3dabc976383e24c28658dfda39.tar.gz cpython-0c759febb660ad3dabc976383e24c28658dfda39.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.c | 1 |
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(); |