mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-01 02:35:03 +00:00
added --die-on-term
This commit is contained in:
@@ -176,9 +176,15 @@ void master_loop(char **argv, char **environ) {
|
||||
|
||||
|
||||
uwsgi_unix_signal(SIGHUP, grace_them_all);
|
||||
uwsgi_unix_signal(SIGTERM, reap_them_all);
|
||||
if (uwsgi.die_on_term) {
|
||||
uwsgi_unix_signal(SIGTERM, kill_them_all);
|
||||
uwsgi_unix_signal(SIGQUIT, reap_them_all);
|
||||
}
|
||||
else {
|
||||
uwsgi_unix_signal(SIGTERM, reap_them_all);
|
||||
uwsgi_unix_signal(SIGQUIT, kill_them_all);
|
||||
}
|
||||
uwsgi_unix_signal(SIGINT, kill_them_all);
|
||||
uwsgi_unix_signal(SIGQUIT, kill_them_all);
|
||||
uwsgi_unix_signal(SIGUSR1, stats);
|
||||
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ void uwsgi_systemd_init(char *systemd_socket) {
|
||||
if (sun->sun_path[0] == '@') sun->sun_path[0] = 0;
|
||||
|
||||
msghdr = uwsgi_malloc(sizeof(struct msghdr));
|
||||
memset(msghdr, sizeof(struct msghdr), 0);
|
||||
memset(msghdr, 0, sizeof(struct msghdr));
|
||||
|
||||
msghdr->msg_iov = uwsgi_malloc(sizeof(struct iovec)*3);
|
||||
memset(msghdr->msg_iov, 0, sizeof(struct iovec)*3);
|
||||
|
||||
@@ -68,6 +68,7 @@ UWSGI_DECLARE_EMBEDDED_PLUGINS static struct option long_base_options[] = {
|
||||
{"vassals-inherit", required_argument, 0, LONG_ARGS_VASSALS_INHERIT},
|
||||
{"reload-mercy", required_argument, 0, LONG_ARGS_RELOAD_MERCY},
|
||||
{"exit-on-reload", no_argument, &uwsgi.exit_on_reload, 1},
|
||||
{"die-on-term", no_argument, &uwsgi.die_on_term, 1},
|
||||
{"help", no_argument, 0, 'h'},
|
||||
{"usage", no_argument, 0, 'h'},
|
||||
{"reaper", no_argument, 0, 'r'},
|
||||
|
||||
Reference in New Issue
Block a user