From: Adam Dickmeiss Date: Thu, 4 Oct 2012 08:14:15 +0000 (+0000) Subject: At graceful stop, kill children processes X-Git-Tag: v1.3.47~1 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=793996694632f95053e1ebf6c9a8f30fd38af9d0;p=metaproxy-moved-to-github.git At graceful stop, kill children processes Metaproxy already did this for normal stop (SIGTERM). This ensure that children processes spawned by modules are removed upon termination of graceful stop too. --- diff --git a/src/metaproxy_prog.cpp b/src/metaproxy_prog.cpp index b72a6ac..f8ead5c 100644 --- a/src/metaproxy_prog.cpp +++ b/src/metaproxy_prog.cpp @@ -90,6 +90,7 @@ static void work_common(void *data) mp::Package pack; pack.router(*routerp).move(); yaz_log(YLOG_LOG, "metaproxy stop"); /* only for graceful stop */ + kill(-process_group, SIGTERM); /* kill all children processes as well */ _exit(0); }