]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
PDNS should always be the leader of the process group 1048/head
authorIgor Maravic <igor@spotify.com>
Tue, 8 Oct 2013 07:56:37 +0000 (09:56 +0200)
committerIgor Maravic <igor@spotify.com>
Tue, 8 Oct 2013 08:00:48 +0000 (10:00 +0200)
That way, we can properly kill all of it's subprocesses!

pdns/receiver.cc

index e487e383835ceff7a3403b78c849f0ad6ed7518e..8d19cf18bbea14e4c76f580c2713116c3319f6d3 100644 (file)
@@ -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);