fixed SIGWINCH in emperor and added emperor rescan master fifo command

This commit is contained in:
Unbit
2014-03-08 08:13:30 +01:00
parent 91dfe779ff
commit b681eab385
3 changed files with 13 additions and 1 deletions
+3
View File
@@ -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);
+9
View File
@@ -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;
+1 -1
View File
@@ -1,6 +1,6 @@
# uWSGI build system
uwsgi_version = '2.0.2'
uwsgi_version = '2.0.3'
import os
import re