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,6 +786,12 @@ static void unseize_task_and_threads(const struct pstree_item *item, int st) ...@@ -786,6 +786,12 @@ static void unseize_task_and_threads(const struct pstree_item *item, int st)
{ {
int i; int i;
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 */ unseize_task(item->pid.real, st); /* item->pid will be here */
for (i = 1; i < item->nr_threads; i++) for (i = 1; i < item->nr_threads; i++)
......
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