Codebase list openrc / 1a44be0
cgroups: only run cgroup setup when starting a service Status call should not set limits as it requires root permissions, also this is not safe, as current process may reach limitation. Solution is to set limits and move process to service cgroup only on start. X-GENTOO-BUG: 500364 X-GENTOO-BUG-URL: https://bugs.gentoo.org/show_bug.cgi?id=500364 Alexander V Vershilov authored 10 years ago William Hubbs committed 9 years ago
1 changed file(s) with 2 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
214214 fi
215215
216216 # Apply cgroups settings if defined
217 if [ "$1" = "start" ] ; then
217218 if [ "$(command -v cgroup_add_service)" = "cgroup_add_service" ]; then
218219 cgroup_add_service /sys/fs/cgroup/openrc
219220 cgroup_add_service /sys/fs/cgroup/systemd/system
220221 fi
221222 [ "$(command -v cgroup_set_limits)" = "cgroup_set_limits" ] && \
222223 cgroup_set_limits
224 fi
223225
224226 # Load our script
225227 sourcex "$RC_SERVICE"