mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-08 06:31:58 +00:00
master_fixup on reloads
This commit is contained in:
@@ -38,7 +38,6 @@ int init_uwsgi_app(int loader, void *arg1, struct wsgi_request *wsgi_req, PyThre
|
||||
|
||||
struct uwsgi_app *wi;
|
||||
|
||||
|
||||
if (wsgi_req->script_name_len == 0) {
|
||||
wsgi_req->script_name = "";
|
||||
}
|
||||
|
||||
@@ -162,6 +162,8 @@ void uwsgi_python_reset_random_seed() {
|
||||
|
||||
void uwsgi_python_post_fork() {
|
||||
|
||||
uwsgi_log("POST FORK %d\n", uwsgi.mywid);
|
||||
|
||||
uwsgi_python_reset_random_seed();
|
||||
|
||||
#ifdef UWSGI_EMBEDDED
|
||||
@@ -176,6 +178,8 @@ void uwsgi_python_post_fork() {
|
||||
PyErr_Clear();
|
||||
#endif
|
||||
|
||||
uwsgi_log("RELEASING GIL %d\n", uwsgi.mywid);
|
||||
|
||||
UWSGI_RELEASE_GIL
|
||||
|
||||
}
|
||||
@@ -828,10 +832,15 @@ void uwsgi_python_init_apps() {
|
||||
|
||||
}
|
||||
|
||||
void uwsgi_python_master_fixup() {
|
||||
void uwsgi_python_master_fixup(int step) {
|
||||
|
||||
if (uwsgi.has_threads) {
|
||||
UWSGI_RELEASE_GIL;
|
||||
if (step == 0) {
|
||||
UWSGI_RELEASE_GIL;
|
||||
}
|
||||
else {
|
||||
UWSGI_GET_GIL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user