From: Igor Maravic Date: Tue, 8 Oct 2013 07:56:37 +0000 (+0200) Subject: PDNS should always be the leader of the process group X-Git-Tag: rec-3.6.0-rc1~343^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1048%2Fhead;p=thirdparty%2Fpdns.git PDNS should always be the leader of the process group That way, we can properly kill all of it's subprocesses! --- diff --git a/pdns/receiver.cc b/pdns/receiver.cc index e487e38383..8d19cf18bb 100644 --- a/pdns/receiver.cc +++ b/pdns/receiver.cc @@ -410,6 +410,10 @@ int main(int argc, char **argv) versionSetProduct("Authoritative Server"); reportAllTypes(); // init MOADNSParser + // Even if PDNS is not deamonized it must be + // the leader of the process group + setpgid(getpid(), 0); + s_programname="pdns"; s_starttime=time(0);