[CRIU] [PATCH v2 05/21] restore: Convert waited helpers and zombies pids in parent's pid_ns

Kirill Tkhai ktkhai at virtuozzo.com
Wed May 31 10:52:28 PDT 2017


Parent waits them by pid in its active pid namespace. So,
it's need to converts them there instead of using vpid().

Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 criu/cr-restore.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/criu/cr-restore.c b/criu/cr-restore.c
index 06ffe9a8b..f0d0fc5e0 100644
--- a/criu/cr-restore.c
+++ b/criu/cr-restore.c
@@ -720,6 +720,7 @@ static int prepare_sigactions(CoreEntry *core)
 
 static int __collect_child_pids(struct pstree_item *p, int state, unsigned int *n)
 {
+	int level = current->pid->level;
 	struct pstree_item *pi;
 
 	list_for_each_entry(pi, &p->children, sibling) {
@@ -733,7 +734,7 @@ static int __collect_child_pids(struct pstree_item *p, int state, unsigned int *
 			return -1;
 
 		(*n)++;
-		*child = vpid(pi);
+		*child = pi->pid->ns[level-1].virt;
 	}
 
 	return 0;



More information about the CRIU mailing list