Fixes for Windows compilation
[metaproxy-moved-to-github.git] / src / metaproxy_prog.cpp
index a6fc78d..0deb96e 100644 (file)
@@ -78,7 +78,11 @@ static void work_common(void *data)
 
     mp::Package pack;
     pack.router(*routerp).move();
+    /* this only exits if graceful stop is received (sig_usr1_handler) */
     yaz_log(YLOG_LOG, "metaproxy stop");
+#if HAVE_UNISTD_H
+    kill(-process_group, SIGTERM); /* kill all children processes as well */
+#endif
     _exit(0);
 }