diff --git a/core/emperor.c b/core/emperor.c index 3b8676b6..e659bac1 100644 --- a/core/emperor.c +++ b/core/emperor.c @@ -1506,6 +1506,8 @@ int uwsgi_emperor_scanner_event(int fd) { } +static void emperor_wakeup(int sn) {} + void emperor_loop() { // monitor a directory @@ -1534,6 +1536,7 @@ void emperor_loop() { } signal(SIGPIPE, SIG_IGN); + signal(SIGWINCH, emperor_wakeup); uwsgi_unix_signal(SIGINT, royal_death); uwsgi_unix_signal(SIGTERM, royal_death); uwsgi_unix_signal(SIGQUIT, royal_death); diff --git a/core/fifo.c b/core/fifo.c index b6e4e748..0ccfcc0c 100644 --- a/core/fifo.c +++ b/core/fifo.c @@ -48,6 +48,14 @@ static void subscriptions_blocker() { } } +static void emperor_rescan() { + if (uwsgi.emperor_pid > 0) { + if (kill(uwsgi.emperor_pid, SIGWINCH)) { + uwsgi_error("emperor_rescan()/kill()"); + } + } +} + /* this is called as soon as possibile allowing plugins (or hooks) to override it @@ -74,6 +82,7 @@ void uwsgi_master_fifo_prepare() { uwsgi_fifo_table['+'] = uwsgi_cheaper_increase; uwsgi_fifo_table['c'] = uwsgi_chain_reload; uwsgi_fifo_table['C'] = uwsgi_go_cheap; + uwsgi_fifo_table['E'] = emperor_rescan; uwsgi_fifo_table['f'] = uwsgi_refork_master; uwsgi_fifo_table['l'] = uwsgi_log_reopen; uwsgi_fifo_table['L'] = uwsgi_log_rotate; diff --git a/uwsgiconfig.py b/uwsgiconfig.py index cdde3aa8..44b76f67 100644 --- a/uwsgiconfig.py +++ b/uwsgiconfig.py @@ -1,6 +1,6 @@ # uWSGI build system -uwsgi_version = '2.0.2' +uwsgi_version = '2.0.3' import os import re