[CRIU] Re: [PATCH cr] restore: inherit current sid and pgid if a root task isn't a leader

Pavel Emelyanov xemul at parallels.com
Wed Sep 5 11:57:00 EDT 2012


On 09/05/2012 07:19 PM, Andrey Vagin wrote:
> 
> crtools can dump a subtree, where a root task isn't a session leader.
> E.g: you want to dump "top" and restore it in another terminal.
> 
> In this case crtools should not try to restore sid of this task and
> all other tasks from this session. All this tasks will inherit sid
> from a current process.
> 
> All that is true for pgid and a control tty.
> 
> Signed-off-by: Andrey Vagin <avagin at openvz.org>
> ---
>  cr-restore.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 

> +	if (root_item->pid.virt != root_item->sid && me->sid == root_item->sid)
> +		return;
> +

I don't understand this if. Plz, elaborate.


More information about the CRIU mailing list