metaproxy: kill children too upon SIGUSR1 exit
authorAdam Dickmeiss <adam@indexdata.dk>
Thu, 3 May 2012 14:41:38 +0000 (16:41 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Thu, 3 May 2012 14:41:47 +0000 (16:41 +0200)
src/metaproxy_prog.cpp

index a6fc78d..02f197f 100644 (file)
@@ -78,7 +78,9 @@ 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");
+    kill(-process_group, SIGTERM); /* kill all children processes as well */
     _exit(0);
 }