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:
committed by
Pavel Emelyanov
parent
15c9eb220e
commit
4429a4c914
4
ptrace.c
4
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;
|
||||
|
Reference in New Issue
Block a user