On 2018/06/02 23:07, Il Ka wrote:
> rc.subr(8) uses pgrep(1)/pkill(1) to control daemons
> using their command lines.
This is intentional.
pid files can easily get out of sync with the expected process (example:
daemon starts, writes a pid file, later it crashes. at any point between
the crash and you trying to stop/restart the daemon another process
could be assigned the same pid, then the wrong process is signalled).
The timescale could be days/weeks/longer.
(I believe there is still a possible race with pkill, but there the
window is tiny, much less than a second.)