[CRIU] [PATCH 2/2] remap: add a dead pid /proc remap

Tycho Andersen tycho.andersen at canonical.com
Fri Sep 5 12:39:33 PDT 2014


On Fri, Sep 05, 2014 at 02:38:05PM -0500, Tycho Andersen wrote:
>
> @@ -248,8 +271,10 @@ static int collect_one_remap(void *obj, ProtobufCMessage *msg)
>  
>  	if (rfe->remap_id & REMAP_GHOST)
>  		ret = open_remap_ghost(rfi, rfe);
> -	else
> +	else if (!rfe->has_remap_type)
>  		ret = open_remap_linked(rfi, rfe);
> +	else if (rfe->remap_type == REMAP_TYPE__PROCFS)
> +		ret = open_remap_dead_process(rfi, rfe);

One thing about this bit of logic, if we made remap_type required, we
could just have it be a switch() instead, which might be a bit
simpler. That would make the images not backwards compatible, though,
not sure if that is a big deal.

Tycho


More information about the CRIU mailing list