From bee59c68c5ff5be426e68ecb603d4cc26542f4af Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Thu, 25 Jul 2013 20:33:51 -0500 Subject: rc-cgroup: make sure the tasks file exists before adding the pid --- sh/rc-cgroup.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/rc-cgroup.sh.in b/sh/rc-cgroup.sh.in index 389e8a07..9329b57b 100644 --- a/sh/rc-cgroup.sh.in +++ b/sh/rc-cgroup.sh.in @@ -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 -- cgit v1.2.3