-
cgmanager: have cgm_set and cgm_get use absolute path when possible · fb6c7616Serge Hallyn authored
This allows users to get/set cgroup settings when logged into a different session than that from which they started the container. There is no cgmanager command to do an _abs variant of cgmanager_get_value and cgmanager_set_value. So we fork off a new task, which enters the parent cgroup of the started container, then can get/set the value from there. The reason not to go straight into the container's cgroup is that if we are freezing the container, or the container is already frozen, we'll freeze as well :) The reason to fork off a new task is that if we are in a cgroup which is set to remove-on-empty, we may not be able to return to our original cgroup after making the change. This should fix https://github.com/lxc/lxc/issues/246Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
fb6c7616
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| include | Loading commit data... | |
| lua-lxc | Loading commit data... | |
| lxc | Loading commit data... | |
| python-lxc | Loading commit data... | |
| tests | Loading commit data... | |
| Makefile.am | Loading commit data... |