commit | 0c759febb660ad3dabc976383e24c28658dfda39 | [log] [tgz] |
---|---|---|
author | Antoine Pitrou <solipsis@pitrou.net> | Wed Apr 27 19:28:05 2011 +0200 |
committer | Antoine Pitrou <solipsis@pitrou.net> | Wed Apr 27 19:28:05 2011 +0200 |
tree | 665621563310f3c1b81062b65c149722e3c85a67 | |
parent | 43ae619925cbcee7b59c3c370829a053fef40acb [diff] |
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.
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 @@ PyOS_AfterFork(void) { #ifdef WITH_THREAD + _PyGILState_Reinit(); PyEval_ReInitThreads(); main_thread = PyThread_get_thread_ident(); main_pid = getpid();