From e8f5d82b7827620e2920303e954f31a96f227c19 Mon Sep 17 00:00:00 2001 From: "roberto@goyle" Date: Wed, 22 Jun 2011 12:40:00 +0200 Subject: [PATCH] -propagate-touch --- loop.c | 7 ++++++- uwsgi.c | 1 + uwsgi.h | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/loop.c b/loop.c index a6cff778..4e409bfe 100644 --- a/loop.c +++ b/loop.c @@ -95,7 +95,12 @@ void *simple_loop(void *arg1) { #ifdef __APPLE__ kill(uwsgi.workers[0].pid, SIGTERM); #else - greacefully_kill(0); + if (uwsgi.propagate_touch) { + kill(uwsgi.workers[0].pid, SIGHUP); + } + else { + gracefully_kill(0); + } #endif } return NULL; diff --git a/uwsgi.c b/uwsgi.c index 658e281b..1461409c 100644 --- a/uwsgi.c +++ b/uwsgi.c @@ -129,6 +129,7 @@ static struct option long_base_options[] = { {"reload-on-as", required_argument, 0, LONG_ARGS_RELOAD_ON_AS}, {"reload-on-rss", required_argument, 0, LONG_ARGS_RELOAD_ON_RSS}, {"touch-reload", required_argument, 0, LONG_ARGS_TOUCH_RELOAD}, + {"propagate-touch", no_argument, &uwsgi.propagate_touch, 1}, {"limit-post", required_argument, 0, LONG_ARGS_LIMIT_POST}, {"no-orphans", no_argument, &uwsgi.no_orphans, 1}, {"prio", required_argument, 0, LONG_ARGS_PRIO}, diff --git a/uwsgi.h b/uwsgi.h index 8918597a..4ecbad8a 100644 --- a/uwsgi.h +++ b/uwsgi.h @@ -986,6 +986,8 @@ struct uwsgi_server { char *touch_reload; time_t last_touch_reload_mtime; + int propagate_touch; + int grunt; char *binary_path;