From 140d65ebca72bc9b64bdac31ede604c0d4e94259 Mon Sep 17 00:00:00 2001 From: Saied Kazemi Date: Mon, 16 Mar 2015 22:03:00 +0300 Subject: [PATCH] Dismantle cgyard in non-detached restore mode. If the --restore-detached command line option is not specified during restore, CRIU should unmount and remove the temporary cgyard directory tree before waiting for the restored process to exit. Otherwise, all the temporary cgyard mount points will remain mounted and visible. Signed-off-by: Saied Kazemi Signed-off-by: Pavel Emelyanov --- cr-restore.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cr-restore.c b/cr-restore.c index 4a1fe4ec9..24d9f8b95 100644 --- a/cr-restore.c +++ b/cr-restore.c @@ -1845,8 +1845,10 @@ static int restore_root_task(struct pstree_item *init) write_stats(RESTORE_STATS); - if (!opts.restore_detach && !opts.exec_cmd) + if (!opts.restore_detach && !opts.exec_cmd) { + fini_cgroup(); wait(NULL); + } return 0;