diff options
author | Igor Sysoev <igor@sysoev.ru> | 2019-02-18 18:34:20 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2019-02-18 18:34:20 +0300 |
commit | acb5b0aad7f9aca966f4d40d05c104f4df68b036 (patch) | |
tree | 17f465cb5a21d18ddda5bdb7a91dbb339a530b92 | |
parent | bb11e9036f8c5bf6f36899bb462709bdbf55bfa4 (diff) | |
download | unit-acb5b0aad7f9aca966f4d40d05c104f4df68b036.tar.gz unit-acb5b0aad7f9aca966f4d40d05c104f4df68b036.tar.bz2 |
Ignoring HUP signal in main process.
Diffstat (limited to '')
-rw-r--r-- | src/nxt_main_process.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/nxt_main_process.c b/src/nxt_main_process.c index a4c3f119..a33117e2 100644 --- a/src/nxt_main_process.c +++ b/src/nxt_main_process.c @@ -52,6 +52,8 @@ static void nxt_main_process_sigusr1_handler(nxt_task_t *task, void *obj, void *data); static void nxt_main_process_sigchld_handler(nxt_task_t *task, void *obj, void *data); +static void nxt_main_process_signal_handler(nxt_task_t *task, void *obj, + void *data); static void nxt_main_cleanup_worker_process(nxt_task_t *task, nxt_pid_t pid); static void nxt_main_stop_worker_processes(nxt_task_t *task, nxt_runtime_t *rt); static void nxt_main_port_socket_handler(nxt_task_t *task, @@ -68,6 +70,7 @@ static void nxt_main_port_access_log_handler(nxt_task_t *task, const nxt_sig_event_t nxt_main_process_signals[] = { + nxt_event_signal(SIGHUP, nxt_main_process_signal_handler), nxt_event_signal(SIGINT, nxt_main_process_sigterm_handler), nxt_event_signal(SIGQUIT, nxt_main_process_sigquit_handler), nxt_event_signal(SIGTERM, nxt_main_process_sigterm_handler), @@ -889,6 +892,14 @@ nxt_main_process_sigchld_handler(nxt_task_t *task, void *obj, void *data) static void +nxt_main_process_signal_handler(nxt_task_t *task, void *obj, void *data) +{ + nxt_trace(task, "signal signo:%d (%s) recevied, ignored", + (int) (uintptr_t) obj, data); +} + + +static void nxt_main_cleanup_worker_process(nxt_task_t *task, nxt_pid_t pid) { nxt_buf_t *buf; |