2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00

seize: don't detach from a task if a freezer cgroup is set

criu detaches from tasks in freezer_detach() in this case

Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
Andrew Vagin
2016-01-16 05:57:53 +03:00
committed by Pavel Emelyanov
parent 15c9eb220e
commit 4429a4c914

View File

@@ -21,6 +21,7 @@
#include "proc_parse.h"
#include "crtools.h"
#include "seccomp.h"
#include "cr_options.h"
int unseize_task(pid_t pid, int orig_st, int st)
{
@@ -49,6 +50,9 @@ int unseize_task(pid_t pid, int orig_st, int st)
} else
pr_err("Unknown final state %d\n", st);
if (opts.freeze_cgroup)
return 0;
if (ptrace(PTRACE_DETACH, pid, NULL, NULL)) {
pr_perror("Unable to detach from %d", pid);
return -1;