[CRIU] [PATCH 09/15] pstree: initialize real pid to -1 for threads on restore

Andrey Vagin avagin at openvz.org
Mon Sep 23 06:33:32 EDT 2013


We are going to check is it valid or not.

Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 pstree.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/pstree.c b/pstree.c
index 3515571..ebf106d 100644
--- a/pstree.c
+++ b/pstree.c
@@ -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++;
-- 
1.8.3.1



More information about the CRIU mailing list