patches that adds ability to generate pidfile during startup of daemon