{
yaz_log(YLOG_LOG, "metaproxy received SIGUSR1");
routerp->stop();
+ yaz_daemon_stop();
}
static void sig_term_handler(int s)
{
#if HAVE_UNISTD_H
process_group = getpgid(0); // save process group ID
-
+
signal(SIGTERM, sig_term_handler);
signal(SIGUSR1, sig_usr1_handler);
#endif
mp::Package pack;
pack.router(*routerp).move();
- /* this only exits if graceful stop is received (sig_usr1_handler) */
- yaz_log(YLOG_LOG, "metaproxy stop");
- kill(-process_group, SIGTERM); /* kill all children processes as well */
+ yaz_log(YLOG_LOG, "metaproxy stop"); /* only for graceful stop */
_exit(0);
}