aboutsummaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorMariusz Zaborski <oshogbo@FreeBSD.org>2021-06-24 18:14:31 +0000
committerMariusz Zaborski <oshogbo@FreeBSD.org>2021-06-24 18:14:31 +0000
commit6ba108e52d175b6833437c8627ae5d0546a4e102 (patch)
tree9f376672241d19fcf41784f4e31a3e8166edd528 /libexec
parent779b70a2264fa187beb232dad2f018d41c31e34a (diff)
Diffstat (limited to 'libexec')
-rw-r--r--libexec/rc/rc.subr6
1 files changed, 3 insertions, 3 deletions
diff --git a/libexec/rc/rc.subr b/libexec/rc/rc.subr
index e859ae06962f..b027fa5facf4 100644
--- a/libexec/rc/rc.subr
+++ b/libexec/rc/rc.subr
@@ -1272,13 +1272,13 @@ $command $rc_flags $command_args"
# We cannot use protect(1) inside jails.
if [ -n "$_oomprotect" ] && [ -f "${PROTECT}" ] &&
[ "$(sysctl -n security.jail.jailed)" -eq 0 ]; then
- pid=$(check_process $command)
+ [ -z "${rc_pid}" ] && eval $_pidcmd
case $_oomprotect in
[Aa][Ll][Ll])
- ${PROTECT} -i -p ${pid}
+ ${PROTECT} -i -p ${rc_pid}
;;
[Yy][Ee][Ss])
- ${PROTECT} -p ${pid}
+ ${PROTECT} -p ${rc_pid}
;;
esac
fi