fixed rack build

This commit is contained in:
roberto@centos64
2012-02-18 08:55:35 +01:00
parent 14941cc1c0
commit cc0fa8dee6
2 changed files with 6 additions and 17 deletions
+6
View File
@@ -180,6 +180,7 @@ int uwsgi_python_init() {
Py_OptimizeFlag = up.optimize;
uwsgi_log("AAAA\n");
Py_Initialize();
@@ -243,10 +244,14 @@ void uwsgi_python_atexit() {
// this time we use this higher level function
// as this code can be executed in a signal handler
uwsgi_log("FOO 0\n");
if (!Py_IsInitialized()) {
return;
}
uwsgi_log("FOO\n");
if (uwsgi.has_threads)
PyGILState_Ensure();
// no need to worry about freeing memory
@@ -1092,6 +1097,7 @@ void uwsgi_python_master_fixup(int step) {
void uwsgi_python_enable_threads() {
uwsgi_log("ALEE\n");
PyEval_InitThreads();
if (pthread_key_create(&up.upt_save_key, NULL)) {
uwsgi_error("pthread_key_create()");