Changeset View
Changeset View
Standalone View
Standalone View
libexec/rc/rc.subr
Show First 20 Lines • Show All 1,652 Lines • ▼ Show 20 Lines | $_cpusetcmd $command $rc_flags $command_args" | ||||
esac | esac | ||||
# Apply protect(1) to the PID if ${name}_oomprotect is set. | # Apply protect(1) to the PID if ${name}_oomprotect is set. | ||||
case "$rc_arg" in | case "$rc_arg" in | ||||
start) | start) | ||||
# We cannot use protect(1) inside jails. | # We cannot use protect(1) inside jails. | ||||
if [ -n "$_oomprotect" ] && [ -f "${PROTECT}" ] && | if [ -n "$_oomprotect" ] && [ -f "${PROTECT}" ] && | ||||
[ "$(sysctl -n security.jail.jailed)" -eq 0 ]; then | ! check_jail jailed; then | ||||
[ -z "${rc_pid}" ] && eval $_pidcmd | [ -z "${rc_pid}" ] && eval $_pidcmd | ||||
case $_oomprotect in | case $_oomprotect in | ||||
[Aa][Ll][Ll]) | [Aa][Ll][Ll]) | ||||
${PROTECT} -d -i -p ${rc_pid} | ${PROTECT} -d -i -p ${rc_pid} | ||||
;; | ;; | ||||
[Yy][Ee][Ss]) | [Yy][Ee][Ss]) | ||||
${PROTECT} -p ${rc_pid} | ${PROTECT} -p ${rc_pid} | ||||
;; | ;; | ||||
▲ Show 20 Lines • Show All 1,118 Lines • Show Last 20 Lines |