allows graceful reloads on shared sockets

This commit is contained in:
roberto@precise64
2012-05-16 11:09:25 +02:00
parent d342bdaf72
commit de51c46fd8
3 changed files with 69 additions and 14 deletions
+4
View File
@@ -249,6 +249,8 @@ void uwsgi_python_reset_random_seed() {
void uwsgi_python_atexit() {
if (uwsgi.mywid == -1) goto realstuff;
// if hijacked do not run atexit hooks
if (uwsgi.workers[uwsgi.mywid].hijacked)
return;
@@ -263,6 +265,8 @@ void uwsgi_python_atexit() {
return;
#endif
realstuff:
// this time we use this higher level function
// as this code can be executed in a signal handler