multithread corner case fixes

This commit is contained in:
Roberto De Ioris
2013-01-21 12:12:36 +01:00
parent 61ee03a99e
commit 0daff2cfe2
2 changed files with 7 additions and 2 deletions
+5
View File
@@ -559,6 +559,11 @@ int uwsgi_respawn_worker(int wid) {
// reset the apps count with a copy from the master
uwsgi.workers[uwsgi.mywid].apps_cnt = uwsgi.workers[0].apps_cnt;
// reset wsgi_request structures
for(i=0;i<uwsgi.cores;i++) {
memset(&uwsgi.workers[uwsgi.mywid].cores[i].req, 0, sizeof(struct wsgi_request));
}
uwsgi_fixup_fds(wid, 0, NULL);
uwsgi.my_signal_socket = uwsgi.workers[wid].signal_pipe[1];
+2 -2
View File
@@ -2957,8 +2957,8 @@ wait_for_call_of_duty:
if (uwsgi.snapshot) {
uwsgi_ignition();
}
// never here
pthread_exit(NULL);
// end of the process...
end_me(0);
}
/*