The branch stable/15 has been updated by netchild: URL: https://cgit.FreeBSD.org/src/commit/?id=37a4bc18181071f5ef72ccd949f8556866f2cbb2
commit 37a4bc18181071f5ef72ccd949f8556866f2cbb2 Author: Alexander Leidinger <[email protected]> AuthorDate: 2026-08-30 09:44:57 +0000 Commit: Alexander Leidinger <[email protected]> CommitDate: 2026-09-06 09:58:45 +0000 rc.subr: svcj - remove the service jail when the service is not running A service whose tracked process had died while another process of its own kept the jail alive, therefore left svcj-${name} behind, and the next start would fail. Fixes: 2efbd480f1d3 rc: add service jails framework MFC after: 1 week MFC to: stable/15 Assisted-by: Claude Code (Opus 5) (cherry picked from commit a70ca1ebd8add7ea99b5674de715ae5fbf389dce) --- libexec/rc/rc.subr | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libexec/rc/rc.subr b/libexec/rc/rc.subr index 0a8acc7ed604..b84d5393bc3f 100644 --- a/libexec/rc/rc.subr +++ b/libexec/rc/rc.subr @@ -1574,6 +1574,10 @@ $command $rc_flags $command_args" stop) if [ -z "$rc_pid" ]; then + if checkyesno ${name}_svcj && + /usr/sbin/jls -j svcj-${name} jid >/dev/null 2>&1; then + $JAIL_CMD -r svcj-${name} 2>/dev/null + fi [ -n "$rc_fast" ] && return 0 _run_rc_notrunning return 1
