Commit 4429a4c9 authored by Andrew Vagin's avatar Andrew Vagin Committed by Pavel Emelyanov

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: 's avatarAndrew Vagin <avagin@virtuozzo.com>
Acked-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 15c9eb22
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include "proc_parse.h" #include "proc_parse.h"
#include "crtools.h" #include "crtools.h"
#include "seccomp.h" #include "seccomp.h"
#include "cr_options.h"
int unseize_task(pid_t pid, int orig_st, int st) 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) ...@@ -49,6 +50,9 @@ int unseize_task(pid_t pid, int orig_st, int st)
} else } else
pr_err("Unknown final state %d\n", st); pr_err("Unknown final state %d\n", st);
if (opts.freeze_cgroup)
return 0;
if (ptrace(PTRACE_DETACH, pid, NULL, NULL)) { if (ptrace(PTRACE_DETACH, pid, NULL, NULL)) {
pr_perror("Unable to detach from %d", pid); pr_perror("Unable to detach from %d", pid);
return -1; return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment