Skip to content
Snippets Groups Projects
Commit 090d9b7e authored by Konstantin Osipov's avatar Konstantin Osipov
Browse files

logging: if pid file is set (background/daemon mode), log a message on signal

parent d70dcf12
No related branches found
No related tags found
No related merge requests found
......@@ -153,6 +153,15 @@ signal_cb(ev_loop *loop, struct ev_signal *w, int revents)
(void) w;
(void) revents;
/**
* If running in daemon mode, complain about possibly
* sudden and unexpected death.
* Real case: an ops A kills the server and ops B files
* a bug that the server suddenly died. Make such case
* explicit in the log.
*/
if (pid_file)
say_crit("got signal %d - %s", w->signum, strsignal(w->signum));
start_loop = false;
/* Terminate the main event loop */
ev_break(loop, EVBREAK_ALL);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment