[CRIU] Re: [PATCH cr 06/12] cr-dump: dump pstree after tasks

Pavel Emelyanov xemul at parallels.com
Mon Jun 4 05:11:53 EDT 2012


On 05/31/2012 04:58 PM, Andrey Vagin wrote:
> 
> because a pid in a target pid ns is got from parasite.
> 
> Signed-off-by: Andrey Vagin <avagin at openvz.org>
> ---
>  cr-dump.c |   54 ++++++++++++++++++++++++++++++++----------------------
>  1 files changed, 32 insertions(+), 22 deletions(-)
> 

> @@ -1584,13 +1584,13 @@ static int dump_one_task(struct pstree_item *item)
>  	if (ret < 0)
>  		goto err;
>  
> -	if (item->state == TASK_DEAD)
> -		return dump_one_zombie(item, &pps_buf);
> +	if (item->state == TASK_DEAD) {
> +		/* FIXME don't support zombie in pid name space*/
> +		item->pid.pid = item->pid.real_pid;
>  
> -	ret = -1;
> -	cr_fdset = cr_task_fdset_open(item->pid.pid, O_DUMP);
> -	if (!cr_fdset)
> -		goto err;
> +		BUG_ON(!list_empty(&item->children));
> +		return dump_one_zombie(item, &pps_buf);
> +	}
>  
>  	ret = collect_mappings(pid, &vma_area_list);
>  	if (ret) {

I don't quite understand this hunk. Either it should be a separate patch or a better comment.


More information about the CRIU mailing list