Commit 625ad48d authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

dump: don't restore a state of threads

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: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent e027f116
...@@ -786,8 +786,10 @@ static void unseize_task_and_threads(const struct pstree_item *item, int st) ...@@ -786,8 +786,10 @@ static void unseize_task_and_threads(const struct pstree_item *item, int st)
{ {
int i; int i;
for (i = 0; i < item->nr_threads; i++) unseize_task(item->pid.real, st); /* item->pid will be here */
unseize_task(item->threads[i].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) static void pstree_switch_state(struct pstree_item *root_item, int st)
......
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