Commit 9cec289f authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

dump: restore state correctly

Currently all task are restored as alive, but stopped tasks
must be restored as stopped.
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 625ad48d
......@@ -786,7 +786,13 @@ static void unseize_task_and_threads(const struct pstree_item *item, int st)
{
int i;
unseize_task(item->pid.real, st); /* item->pid will be here */
if (item->state == TASK_DEAD)
return;
if (st == TASK_ALIVE)
unseize_task(item->pid.real, item->state);
else
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);
......
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