rc-cgroup: make sure the tasks file exists before adding the pid

This commit is contained in:
William Hubbs 2013-07-25 20:33:51 -05:00
parent 35f2f1ec73
commit bee59c68c5

View File

@ -77,7 +77,7 @@ cgroup_add_service()
# cgroups. But may lead to a problems where that inheriting
# is needed.
for d in /sys/fs/cgroup/* ; do
echo 0 > "${d}"/tasks
[ -f "${d}"/tasks ] && echo 0 > "${d}"/tasks
done
openrc_cgroup=/sys/fs/cgroup/openrc