]> git.ipfire.org Git - thirdparty/lxc.git/commit
Remove the a previous cgroup
authorDaniel Lezcano <dlezcano@fr.ibm.com>
Thu, 16 Jul 2009 14:38:15 +0000 (16:38 +0200)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Thu, 16 Jul 2009 14:38:15 +0000 (16:38 +0200)
commit0dd4566ecadfa4a42529250513dc68b6aed4ce92
treec7e0094d21aa887e7d9a0cdef3cbf0e8778ab5d1
parent3a0f472d9dcf1d343dcec1d6d644a8d925fa3ce7
Remove the a previous cgroup

As a previous run may have created a cgroup but died unexpectedly,
the cgroup can be still there when we try to launch the container
again with the same name. This patch removes the directory if it is
present, if this one is not owned by caller or it is in use (that should
not happen), the rmdir will fail with the corresponding errno.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/cgroup.c