Date: Thu, 10 Apr 2025 13:33:09 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 285742] usr.sbin/daemon refuses to shut down even after child is terminated Message-ID: <bug-285742-227-FiKaau2gAV@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-285742-227@https.bugs.freebsd.org/bugzilla/>
index | next in thread | previous in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=285742 Dave Cottlehuber <dch@freebsd.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |Works As Intended Status|New |Closed --- Comment #3 from Dave Cottlehuber <dch@freebsd.org> --- The rc framework doesn't handle this case, users need to add a few lines to accommodate it pidfile="/var/run/${name}.pid" daemon_pidfile="/var/run/${name}-daemon.pid" procname="%%PREFIX%%/sbin/homunculus" command="/usr/sbin/daemon" command_args="-f -c -R 5 -r -T ${name} -p ${pidfile} -P ${daemon_pidfile} ${procname} ${homunculus_args}" start_precmd=homunculus_startprecmd stop_postcmd=homunculus_stoppostcmd homunculus_startprecmd() { if [ ! -e ${daemon_pidfile} ]; then install -o ${homunculus_user} -g ${anubis_group} /dev/null ${daemon_pidfile}; fi if [ ! -e ${pidfile} ]; then install -o ${homunculus_user} -g ${anubis_group} /dev/null ${pidfile}; fi } homunculus_stoppostcmd() { if [ -f "${daemon_pidfile}" ]; then pids=$( pgrep -F ${daemon_pidfile} 2>&1 ) _err=$? [ ${_err} -eq 0 ] && kill -9 ${pids} fi } run_rc_command "$1" -- You are receiving this mail because: You are on the CC list for the bug.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-285742-227-FiKaau2gAV>
