Before these two patches the pidfile would get written when procServ was daemonized (default), but not when in --foreground mode. When deamonized, pidfile would always get written even if no --pidfile option was specified, and the pid.txt was created in the current folder from where procServ binary was invoked. This is rarely a good choice especially when invoked from boot managers like systemd. Nevertheless, I've split the patch into two commits if you decide that dropping pid.txt is too invasive and breaks backward compatibility.
Before these two patches the pidfile would get written when procServ was daemonized (default), but not when in --foreground mode. When deamonized, pidfile would always get written even if no --pidfile option was specified, and the pid.txt was created in the current folder from where procServ binary was invoked. This is rarely a good choice especially when invoked from boot managers like systemd. Nevertheless, I've split the patch into two commits if you decide that dropping pid.txt is too invasive and breaks backward compatibility.