[CRIU] Re: [PATCH 13/14] pstree: Migrate SIDs/PGIDs if requested
Pavel Emelyanov
xemul at parallels.com
Mon Oct 8 11:23:55 EDT 2012
On 10/08/2012 07:21 PM, Cyrill Gorcunov wrote:
> On Mon, Oct 08, 2012 at 07:08:46PM +0400, Pavel Emelyanov wrote:
>>> +struct pstree_opts {
>>> + bool root_inherit_sid;
>>> + bool root_inherit_pgid;
>>> +
>>> + pid_t new_sid;
>>> + pid_t new_pgid;
>>> +};
>>> +
>>
>> Why separate structure for new opts?
>
> This is easier to carry in function args, also initially it
> was two separate options in command line to be able to inherit
> sids without process group modification as required at tty
> restore.
>
>> And I don't see any hunks on dump-stage checking that the sid/pgid
>> is not leaked outside of the dumping subtree.
>
> Wait, the idea of this options is to be able to restore subtree with
> some SID inherited from running crtools instance. So I'm a bit confused,
> which check you mean here?
If at dump stage we see, that the session leader of root task is not in
the image, we should abort dumping. The option should explicitly allow this.
> ...
>
>>
>> If it was properly fixed on the dump stage, you wouldn't require this thing.
>
> At dump time we don't know the sid we will inherit.
Yes, but in the image there should be -1 in session saying that the session
is inherited.
More information about the CRIU
mailing list