[CRIU] [PATCH] criu: Add exec-cmd option (v2)

Pavel Emelyanov xemul at parallels.com
Fri Mar 21 04:56:00 PDT 2014


On 03/21/2014 03:51 PM, Andrew Vagin wrote:

>>> 1. we cannot check the exec call
>>
>> This is hardly required, since even if it fails, we cannot abort the
>> restored tree.
> 
> Can we resume the restored tree before executing "exec-cmd".
> My opinion is that we can't, because it may fail.
> 
> So maybe we need to fork a process for "exec-cmd" before restoring
> processes.
> 
> criu restore
> \
>  criu restore (It will exec the cmd)
>   \
>    restore tree
> 
> This intermediate process does nothing while we are restoring processes.
> If all processes are restored successfully, the first process gives a
> signal to the second one to exec the cmd. And only if the cmd is
> executed successfully, the first process resumes the restored tree.
> 
> In this case we will able to safely rollback if exec-cmd fails.
> 
> Does it sound reasonable?

It looks reasonable and unifies the --exec-cmd with and without -d option.
An extra process in non-detach case doesn't look bad. Dayan, what do you think?

Thanks,
Pavel


More information about the CRIU mailing list