Empty rvrrpd.pid on OPNsense 22.1.8 (based on FreeBSD 13.0)
wellsgz opened this issue · comments
Run rvrrpd with daemon mode, pid file is created under user defined path, e.g., /usr/tmp/rvrrpd.pid in my case, yet it's empty and the pid is not being populated.
root@OPNsense:/var/tmp # ps -aux | grep rvrrpd
root 53016 0.0 0.2 55948 8248 - S 18:20 0:19.83 /usr/local/bin/rvrrpd -m2
root 60479 0.0 0.0 4548 2060 0 R+ 18:51 0:00.00 grep rvrrpd
root@OPNsense:/var/tmp # ls -la /var/tmp/rvrrpd.pid
-rw-r--r-- 1 root wheel 0 May 31 18:14 /var/tmp/rvrrpd.pid
First of all, sorry for the long response/delay and thanks for reporting that out. I will have a look at this potential 'bug' when I will rebuild my FreeBSD development environment.
Okay. I tested the latest release on a FreeBSD 12 system, and in fact, there were no process id inside the .pid
file.
I replaced the old and rather buggy Daemonize
crate with a newer and more elegant one, namely Daemonizr
.
This is a direct fix for your issue, and is available on the freebsd11-empty-rvrrpdpid branch.
Let me know if it works for you! If you encounter another bug or you have any suggestions, don't hesitate to comment or open a new issue.
I can close this issue, the bug has been fixed and the patch successfully tested on FreeBSD and Linux.