[Bug 256221] dns/knot-resolver: the kresd init script won't stop the service

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 03 Jun 2021 17:57:26 +0000
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=256221

--- Comment #10 from Chris Hutchinson <portmaster_at_bsdforge.com> ---
(In reply to Vladimír Čunát from comment #9)
> -HUP isn't supported, -TERM is the way (for both kresd and kres-cache-gc).
-HUP *does* remove kresd from the process list. So
I think we can safely assume it gets killed. BUT I
completely agree that -TERM is the correct answer here.
daemon(8) appears to me to be unnecessary overhead,
and just muddies the water. eg;
# ps waux | grep kres
root       26098   0.0  0.0    11004    2024  -  Is   13:30        0:00.00
daemon: /usr/local/sbin/kresd[26553] (daemon)
root       26553   0.0  0.1   140312   40388  -  S    13:30        0:46.35
/usr/local/sbin/kresd -c /usr/local/etc/knot-resolver/kr

NOTE above that process 26553 is the daemon(8) initiation
process. Whereas 26098 is the kresd(8) process itself. So in
using daemon(8), we end up with 2 procs/pids. Whereas simply
starting kresd(8) alone as a daemon reduces that to the
kresd(8) proc/pid (kresd.pid).

I'm cobbling up a new rc.d/kresd init script now that currently
provides START && STOP. But want to add RESTART to it as well.
I'd have already posted it here. But I'm juggling this along side
$WORK and all my testing is on a production server that actually
depends on kresd already. So testing is a little strained.
I should be able to provide something here for further examination
within a couple hours.

--Chris

-- 
You are receiving this mail because:
You are the assignee for the bug.
Received on Thu Jun 03 2021 - 17:57:26 UTC

Original text of this message