set a mercy mode for INT/QUIT

This commit is contained in:
roberto@debian32
2011-06-05 07:38:58 +02:00
parent 3b53f89a24
commit f35a36ac02
2 changed files with 9 additions and 1 deletions
+8
View File
@@ -408,6 +408,14 @@ void goodbye_cruel_world() {
void kill_them_all(int signum) {
int i;
uwsgi.to_hell = 1;
if (uwsgi.reload_mercy > 0) {
uwsgi.master_mercy = time(NULL) + uwsgi.reload_mercy;
}
else {
uwsgi.master_mercy = time(NULL) + 5;
}
uwsgi_log("SIGINT/SIGQUIT received...killing workers...\n");
for (i = 1; i <= uwsgi.numproc; i++) {
if (uwsgi.workers[i].pid > 0)
+1 -1
View File
@@ -1,6 +1,6 @@
# uWSGI build system
uwsgi_version = '0.9.8-dev'
uwsgi_version = '0.9.8'
import os
import re