summaryrefslogtreecommitdiff
path: root/cgroup.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-04-21 03:27:44 +0200
committerLennart Poettering <lennart@poettering.net>2010-04-21 03:27:44 +0200
commita16e112358ea8fea381ee106b89e645aed8b0a8c (patch)
treef38b204ec041c25974397a7711a105cbe7509c07 /cgroup.c
parent0d9068141e07ba29483ebe8bc4aaed6aacde1562 (diff)
reload: implement reload/reexec logic
Diffstat (limited to 'cgroup.c')
-rw-r--r--cgroup.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/cgroup.c b/cgroup.c
index 4ceaf38277..83c5d4028d 100644
--- a/cgroup.c
+++ b/cgroup.c
@@ -478,7 +478,7 @@ int manager_setup_cgroup(Manager *m) {
return r;
}
-int manager_shutdown_cgroup(Manager *m) {
+int manager_shutdown_cgroup(Manager *m, bool delete) {
struct cgroup *cg;
int r;
@@ -495,11 +495,10 @@ int manager_shutdown_cgroup(Manager *m) {
goto finish;
}
- if ((r = cgroup_delete_cgroup_ext(cg, CGFLAG_DELETE_IGNORE_MIGRATION|CGFLAG_DELETE_RECURSIVE)) != 0) {
- log_error("Failed to delete cgroup hierarchy group: %s", cgroup_strerror(r));
- r = translate_error(r, errno);
- goto finish;
- }
+ /* Often enough we won't be able to delete the cgroup we
+ * ourselves are in, hence ignore all errors here */
+ if (delete)
+ cgroup_delete_cgroup_ext(cg, CGFLAG_DELETE_IGNORE_MIGRATION|CGFLAG_DELETE_RECURSIVE);
r = 0;
finish: