From 5488e86bd141d9c9b01d8687e90462b2f08cd7aa Mon Sep 17 00:00:00 2001 From: Peter van Dijk Date: Thu, 11 Oct 2012 08:30:56 +0000 Subject: [PATCH] make traceback handler optional, closes #497 git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2798 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- pdns/common_startup.cc | 2 ++ pdns/pdns.conf-dist | 5 +++++ pdns/receiver.cc | 12 +++++++++++- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/pdns/common_startup.cc b/pdns/common_startup.cc index 0f0dd0bac..258e03eb0 100644 --- a/pdns/common_startup.cc +++ b/pdns/common_startup.cc @@ -136,6 +136,8 @@ void declareArguments() ::arg().set("entropy-source", "If set, read entropy from this file")="/dev/urandom"; ::arg().set("lua-prequery-script", "Lua script with prequery handler")=""; + + ::arg().setSwitch("traceback-handler","Enable the traceback handler (Linux only)")="yes"; } void declareStats(void) diff --git a/pdns/pdns.conf-dist b/pdns/pdns.conf-dist index 873f6f7f3..c85c16d93 100644 --- a/pdns/pdns.conf-dist +++ b/pdns/pdns.conf-dist @@ -359,6 +359,11 @@ # # tcp-control-secret= +################################# +# traceback-handler Enable the traceback handler (Linux only) +# +# traceback-handler=yes + ################################# # trusted-notification-proxy IP address of incoming notification proxy # diff --git a/pdns/receiver.cc b/pdns/receiver.cc index 96e714c1a..d66a633b9 100644 --- a/pdns/receiver.cc +++ b/pdns/receiver.cc @@ -466,7 +466,17 @@ int main(int argc, char **argv) // we really need to do work - either standalone or as an instance - + +#ifdef __linux__ + if(!::arg().mustDo("traceback-handler")) { + L<