Created attachment 270463 [details] diff for adding stop_postcmd to /usr/local/etc/rc.d/dnscrypt-proxy After upgrading from FreeBSD 13.5 to 14.4, dnscrypt-proxy can no longer be restarted with the provided rc.d script: # /usr/local/etc/rc.d/dnscrypt-proxy restart Stopping dnscrypt_proxy. Waiting for PIDS: 34728. dnscrypt_proxy already running? (pid=34728). Stopping dnscrypt-proxy leaves the pid file in the filesystem for a moment: /usr/local/etc/rc.d/dnscrypt-proxy stop ; ls -l /var/run/dnscrypt-proxy.pid ; sleep 1 ; ls -l /var/run/dnscrypt-proxy.pid Stopping dnscrypt_proxy. Waiting for PIDS: 96079. -rw------- 1 root wheel 5 May 6 15:40 /var/run/dnscrypt-proxy.pid ls: /var/run/dnscrypt-proxy.pid: No such file or directory The issue appears to be caused by a change in wait_for_pids() in /etc/rc.subr. On FreeBSD 13.5 there was a sleep 1 included which is missing in FreeBSD 14.4's rc.subr. I added a stop_postcmd to /usr/local/etc/rc.d/dnscrypt-proxy to wait the pid file to disappear. Please see the attached diff.