From 1a3bbc1bafea87169a1ed78f78a964ba06231b11 Mon Sep 17 00:00:00 2001 From: Igor Maravic Date: Tue, 8 Oct 2013 09:56:37 +0200 Subject: [PATCH] PDNS should always be the leader of the process group That way, we can properly kill all of it's subprocesses! --- pdns/receiver.cc | 4 ++++ 1 file changed, 4 insertions(+) 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); -- 2.47.2