• R
    cgroup: Change virCgroupRemove to remove all descendant groups at first · 842b51ff
    Ryota Ozaki 提交于
    As same as normal directories, a cgroup cannot be removed if it
    contains sub groups. This patch changes virCgroupRemove to remove
    all descendant groups (subdirectories) of a target group before
    removing the target group.
    
    The handling is required when we run lxc with ns subsystem of cgroup.
    Ns subsystem automatically creates child cgroups on every process
    forks, but unfortunately the groups are not removed on process exits,
    so we have to remove them by ourselves.
    
    With this patch, such child (and descendant) groups are surely removed
    at lxc shutdown, i.e., lxcVmCleanup which calls virCgroupRemove.
    842b51ff
cgroup.c 24.7 KB