reinit the TLS before anything else (#130)

PyEval_ReInitThread can run arbitrary Python code, which really ought to have
the TLS initialized.
This commit is contained in:
Benjamin Peterson 2017-02-20 23:43:15 -08:00 committed by GitHub
parent c0b336e0ad
commit d9a75744ee
1 changed files with 1 additions and 1 deletions

View File

@ -172,7 +172,7 @@ void
PyOS_AfterFork(void)
{
#ifdef WITH_THREAD
PyEval_ReInitThreads();
PyThread_ReInitTLS();
PyEval_ReInitThreads();
#endif
}