[CRIU] [PATCH 2/3] seize: don't detach from a task if a freezer cgroup is set

Andrey Vagin avagin at openvz.org
Fri Jan 15 18:57:53 PST 2016


From: Andrew Vagin <avagin at virtuozzo.com>

criu detaches from tasks in freezer_detach() in this case

Signed-off-by: Andrew Vagin <avagin at virtuozzo.com>
---
 ptrace.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ptrace.c b/ptrace.c
index 93f4eec..85c7603 100644
--- a/ptrace.c
+++ b/ptrace.c
@@ -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;
-- 
2.4.3



More information about the CRIU mailing list