aboutsummaryrefslogtreecommitdiff
path: root/sh/openrc-run.sh.in
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2021-01-05 17:02:30 -0600
committerWilliam Hubbs <w.d.hubbs@gmail.com>2021-01-05 17:02:30 -0600
commit9a6698876af1c7563ae7a3237111fc43cf4f5bda (patch)
tree357d9723cb39eb5c88d5dbb396582dd69a613dde /sh/openrc-run.sh.in
parentbf9af1fb23b57af38880d824e7bba37a648f12fb (diff)
improve the diagnostic when the ulimit builtin fails
X-Gentoo-Bug:739274 X-Gentoo-Bug-URL:https://bugs.gentoo.org/739274
Diffstat (limited to 'sh/openrc-run.sh.in')
-rw-r--r--sh/openrc-run.sh.in7
1 files changed, 5 insertions, 2 deletions
diff --git a/sh/openrc-run.sh.in b/sh/openrc-run.sh.in
index 7e9064c2..06f46908 100644
--- a/sh/openrc-run.sh.in
+++ b/sh/openrc-run.sh.in
@@ -254,8 +254,11 @@ fi
for _cmd; do
if [ "$_cmd" != status -a "$_cmd" != describe ]; then
# Apply any ulimit defined
- [ -n "${rc_ulimit:-$RC_ULIMIT}" ] && \
- ulimit ${rc_ulimit:-$RC_ULIMIT}
+ if [ -n "${rc_ulimit:-$RC_ULIMIT}" ]; then
+ if ! ulimit ${rc_ulimit:-$RC_ULIMIT}; then
+ eerror "${RC_SVCNAME: unable to apply RC_ULIMIT settings"
+ fi
+ fi
# Apply cgroups settings if defined
if [ "$(command -v cgroup_add_service)" = "cgroup_add_service" ]
then