From: Adam Dickmeiss Date: Wed, 25 Apr 2012 11:22:39 +0000 (+0200) Subject: Log when metaproxy is stopped X-Git-Tag: v1.3.34~7 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=1c92d8843e50589b0e30d0879fc583c4e4395d9d;p=metaproxy-moved-to-github.git Log when metaproxy is stopped --- 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); }