diff options
author | William Hubbs <w.d.hubbs@gmail.com> | 2017-09-14 10:55:06 -0500 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2017-09-14 10:55:06 -0500 |
commit | 2b0345165e5af57ca61a4000c3671bbe6d677cf9 (patch) | |
tree | a6442605fc31b5c39b56465eb84cbc186c28219d /sh/openrc-run.sh.in | |
parent | 8885580986ab8adc951fe32b9323c8b16130fb4f (diff) |
Make cgroup_cleanup send only one sigterm and sigkill
Instead of looping and sending multiple signals to child processes in
cgroup_cleanup, we send sigterm followed by sleeping one second then
sigkill.
This brings us more in line with systemd's "control group" killmode
setting.
Also, this commit includes several shellcheck cleanups.
Diffstat (limited to 'sh/openrc-run.sh.in')
-rw-r--r-- | sh/openrc-run.sh.in | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sh/openrc-run.sh.in b/sh/openrc-run.sh.in index e778bd09..05cb972b 100644 --- a/sh/openrc-run.sh.in +++ b/sh/openrc-run.sh.in @@ -365,9 +365,9 @@ while [ -n "$1" ]; do then "$1"_post || exit $? fi - [ "$(command -v cgroup_cleanup)" = "cgroup_cleanup" -a \ - "$1" = "stop" ] && \ - yesno "${rc_cgroup_cleanup}" && \ + [ "$(command -v cgroup_cleanup)" = "cgroup_cleanup" ] && + [ "$1" = "stop" ] && + yesno "${rc_cgroup_cleanup}" && \ cgroup_cleanup if [ "$(command -v cgroup2_remove)" = "cgroup2_remove" ]; then [ "$1" = stop ] || [ -z "${command}" ] && |