aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2017-09-15 13:42:50 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2017-09-15 13:42:50 -0500
commit4651b8c7e9e2ef9c1ea1fb8d174d1ca4693627af (patch)
tree701ba1e4b070de5c5b4ea1c8a73d90f254b7bd82
parent50608b54ed98acb54fec5fe3323909ea684d3af9 (diff)
rc-cgroup.sh: cgroup_cleanup fix error handling
cgroup_cleanup should warn if it is unable to clean up all processes in the control group, but it will always return success.
-rw-r--r--sh/rc-cgroup.sh.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/sh/rc-cgroup.sh.in b/sh/rc-cgroup.sh.in
index 3c7558cd..2a54ee4a 100644
--- a/sh/rc-cgroup.sh.in
+++ b/sh/rc-cgroup.sh.in
@@ -212,5 +212,7 @@ cgroup_cleanup()
yesno "${rc_send_sigkill:-yes}" &&
kill -s KILL ${pids} 2> /dev/null
fi
- eend 0
+ [ -z "$(cgroup_get_pids)" ]
+ eend $? "Unable to stop all processes"
+ return 0
}