[CRIU] [PATCH 1/6] dump: don't restore a state of threads
Andrey Vagin
avagin at openvz.org
Thu Dec 19 04:59:41 PST 2013
It is not needed, because stat is a property of task,
so we can restore a state of task and it should be enough.
Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
cr-dump.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/cr-dump.c b/cr-dump.c
index ffae7ff..ab53e6e 100644
--- a/cr-dump.c
+++ b/cr-dump.c
@@ -785,8 +785,10 @@ static void unseize_task_and_threads(const struct pstree_item *item, int st)
{
int i;
- for (i = 0; i < item->nr_threads; i++)
- unseize_task(item->threads[i].real, st); /* item->pid will be here */
+ unseize_task(item->pid.real, st); /* item->pid will be here */
+
+ for (i = 1; i < item->nr_threads; i++)
+ ptrace(PTRACE_DETACH, item->threads[i].real, NULL, NULL);
}
static void pstree_switch_state(struct pstree_item *root_item, int st)
--
1.8.3.1
More information about the CRIU
mailing list