+ pack.router(*routerp).move();
+#if HAVE_UNISTD_H
+ switch (sig_received)
+ {
+ case SIGTERM:
+ yaz_log(YLOG_LOG, "metaproxy received SIGTERM");
+ break;
+ case SIGUSR1:
+ yaz_log(YLOG_LOG, "metaproxy received SIGUSR1");
+ break;
+ case 0:
+ break;
+ default:
+ yaz_log(YLOG_LOG, "metaproxy received signo=%d", sig_received);
+ }
+#endif
+ yaz_log(YLOG_LOG, "metaproxy stop");
+ delete routerp;
+ routerp = 0;
+#if HAVE_UNISTD_H
+ kill(-process_group, SIGTERM); /* kill all children processes as well */
+#endif
+ _exit(0);
+}
+
+static void work_debug(void *data)
+{
+ work_common(data);
+}
+
+static void work_normal(void *data)
+{
+#if HAVE_UNISTD_H
+ /* make the current working process group leader */
+ setpgid(0, 0);
+#endif
+ work_common(data);