mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
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.
This commit is contained in:
parent
43ae619925
commit
0c759febb6
4 changed files with 23 additions and 0 deletions
|
|
@ -991,6 +991,7 @@ void
|
|||
PyOS_AfterFork(void)
|
||||
{
|
||||
#ifdef WITH_THREAD
|
||||
_PyGILState_Reinit();
|
||||
PyEval_ReInitThreads();
|
||||
main_thread = PyThread_get_thread_ident();
|
||||
main_pid = getpid();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue