summaryrefslogtreecommitdiffstats
path: root/Modules/signalmodule.c
diff options
context:
space:
mode:
authorCharles-François Natali <neologix@free.fr>2012-02-02 19:38:10 (GMT)
committerCharles-François Natali <neologix@free.fr>2012-02-02 19:38:10 (GMT)
commit3f32fc87adfa5e14ee24c8dc94e629e74283d1ca (patch)
tree23f3c9cf35f01d95bd5b16e7f72a15f7afa11108 /Modules/signalmodule.c
parent4b0eab62f04fc2e738b1bff1d170c7f6f96c1920 (diff)
parent227e377b36378d4cc86c3dd182f8d7c031e41f86 (diff)
downloadcpython-3f32fc87adfa5e14ee24c8dc94e629e74283d1ca.zip
cpython-3f32fc87adfa5e14ee24c8dc94e629e74283d1ca.tar.gz
cpython-3f32fc87adfa5e14ee24c8dc94e629e74283d1ca.tar.bz2
Merge.
Diffstat (limited to 'Modules/signalmodule.c')
-rw-r--r--Modules/signalmodule.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c
index c28f7af..e46f8cf 100644
--- a/Modules/signalmodule.c
+++ b/Modules/signalmodule.c
@@ -1403,12 +1403,14 @@ void
PyOS_AfterFork(void)
{
#ifdef WITH_THREAD
+ /* PyThread_ReInitTLS() must be called early, to make sure that the TLS API
+ * can be called safely. */
+ PyThread_ReInitTLS();
_PyGILState_Reinit();
PyEval_ReInitThreads();
main_thread = PyThread_get_thread_ident();
main_pid = getpid();
_PyImport_ReInitLock();
- PyThread_ReInitTLS();
#endif
}