From 1c92d8843e50589b0e30d0879fc583c4e4395d9d Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 25 Apr 2012 13:22:39 +0200 Subject: [PATCH] Log when metaproxy is stopped --- src/metaproxy_prog.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/metaproxy_prog.cpp b/src/metaproxy_prog.cpp index 7183419..57c59e6 100644 --- a/src/metaproxy_prog.cpp +++ b/src/metaproxy_prog.cpp @@ -52,11 +52,14 @@ static pid_t process_group = 0; static void sig_usr1_handler(int s) { + yaz_log(YLOG_LOG, "metaproxy received SIGUSR1"); routerp->stop(); } static void sig_term_handler(int s) { + yaz_log(YLOG_LOG, "metaproxy received SIGTERM"); + yaz_log(YLOG_LOG, "metaproxy stop"); kill(-process_group, SIGTERM); /* kill all children processes as well */ _exit(0); } @@ -74,7 +77,8 @@ static void work_common(void *data) routerp->start(); mp::Package pack; - pack.router(*routerp).move(); /* should never exit */ + pack.router(*routerp).move(); + yaz_log(YLOG_LOG, "metaproxy stop"); _exit(0); } -- 1.7.10.4