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

Pavel Tikhomirov ptikhomirov at virtuozzo.com
Mon May 29 02:47:30 PDT 2017


Reviewed-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>

On 05/23/2017 03:38 PM, Kirill Tkhai wrote:
> 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 fabfb80ce..446583332 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;
> 

-- 
Best regards, Tikhomirov Pavel
Software Developer, Virtuozzo.


More information about the CRIU mailing list