Commit 5273ae90 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

pstree: initialize real pid to -1 for threads on restore

We are going to check is it valid or not.
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent dbd41b52
......@@ -363,8 +363,10 @@ static int read_pstree_image(void)
if (!pi->threads)
break;
for (i = 0; i < e->n_threads; i++)
for (i = 0; i < e->n_threads; i++) {
pi->threads[i].real = -1;
pi->threads[i].virt = e->threads[i];
}
task_entries->nr_threads += e->n_threads;
task_entries->nr_tasks++;
......
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