[CRIU] [PATCH 5/5] tty: Use regular files engine to save paths to the peers, v3
Cyrill Gorcunov
gorcunov at gmail.com
Wed Oct 15 04:23:25 PDT 2014
On Wed, Oct 15, 2014 at 03:19:52PM +0400, Pavel Emelyanov wrote:
> On 10/15/2014 03:11 PM, Cyrill Gorcunov wrote:
> > On Wed, Oct 15, 2014 at 02:46:27PM +0400, Pavel Emelyanov wrote:
> >>
> >>> @@ -988,6 +1168,25 @@ static int collect_one_tty(void *obj, ProtobufCMessage *msg)
> >>> if (verify_info(info))
> >>> return -1;
> >>>
> >>> + info->reg_d = find_file_desc_raw(FD_TYPES__REG, info->tfe->id);
> >>
> >> Does this even succeed? The file_desc_add() on info->tfe->id happens at the end
> >> of this function.
> >
> > This is different file_desc_add. Look, on dump we save reg-file entry with
> > id = info->tfe->id. Then on restore all reg-entries are collected before we
> > collecting ttys, so this file_desc_add() simply stacks this fd on top of
> > the hash chain.
>
> Ah, I see. I think it's better use the collect_special_file() in this place,
> it will handle the case when you opened /dev/ptmx and removed one afterwards.
> BTW, let's add this test too :)
Will try ;)
More information about the CRIU
mailing list