[CRIU] [PATCH v3 11/55] pid: Use last_level_pid() in restore_pgid()

Kirill Tkhai ktkhai at virtuozzo.com
Mon Apr 10 01:16:51 PDT 2017


This patch is cleanup, which just makes comparation
on values on the one pid level. It has no functional
payload, because the new patches turn off pgid set
if for multi-level pids cases, till it will be implemented.

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

diff --git a/criu/cr-restore.c b/criu/cr-restore.c
index 38f24f351..516dfe2a7 100644
--- a/criu/cr-restore.c
+++ b/criu/cr-restore.c
@@ -1232,7 +1232,7 @@ static void restore_pgid(void)
 	if (my_pgid == pgid)
 		return;
 
-	if (my_pgid != vpid(current)) {
+	if (my_pgid != last_level_pid(current->pid)) {
 		struct pstree_item *leader;
 
 		/*
@@ -1254,7 +1254,7 @@ static void restore_pgid(void)
 		exit(1);
 	}
 
-	if (my_pgid == vpid(current))
+	if (my_pgid == last_level_pid(current->pid))
 		futex_set_and_wake(&rsti(current)->pgrp_set, 1);
 }
 



More information about the CRIU mailing list