* Default: no
If the webserver should print arguments. See ["Performance Monitoring"](../common/logging.md#performance-monitoring).
+
+## `write-pid`
+* Boolean
+* Default: yes
+
+If a PID file should be written. Available since 4.0.
By default, PowerDNS replies to the 'version.bind' query with its version number.
Security conscious users may wish to override the reply PowerDNS issues.
+
+## `write-pid`
+* Boolean
+* Default: yes
+
+If a PID file should be written. Available since 4.0.
{
::arg().set("local-port","The port on which we listen")="53";
::arg().setSwitch("experimental-dnsupdate","Enable/Disable DNS update (RFC2136) support. Default is no.")="no";
+ ::arg().setSwitch("write-pid","Write a PID file")="yes";
::arg().set("allow-dnsupdate-from","A global setting to allow DNS updates from these IP ranges.")="127.0.0.0/8,::1";
::arg().setSwitch("forward-dnsupdate","A global setting to allow DNS update packages that are for a Slave domain, to be forwarded to the master.")="yes";
::arg().setSwitch("log-dns-details","If PDNS should log DNS non-erroneous details")="no";
string s_pidfname;
static void writePid(void)
{
+ if(!::arg().mustDo("write-pid"))
+ return;
ofstream of(s_pidfname.c_str(), std::ios_base::app);
if(of)
of<< Utility::getpid() <<endl;
::arg().setSwitch("non-local-bind", "Enable binding to non-local addresses by using FREEBIND / BINDANY socket options")="no";
::arg().set("trace","if we should output heaps of logging. set to 'fail' to only log failing domains")="off";
::arg().set("daemon","Operate as a daemon")="yes";
+ ::arg().setSwitch("write-pid","Write a PID file")="yes";
::arg().set("loglevel","Amount of logging. Higher is more. Do not set below 3")="4";
::arg().set("log-common-errors","If we should log rather common errors")="yes";
::arg().set("chroot","switch to chroot jail")="";
static void writePid(void)
{
+ if(!::arg().mustDo("write-pid"))
+ return;
+
string fname=::arg()["socket-dir"]+"/"+s_programname+".pid";
ofstream of(fname.c_str());
if(of)