[CRIU] Re: [PATCH 3/6] tty: Add checkpoint/restore for unix
terminals v5
Cyrill Gorcunov
gorcunov at openvz.org
Tue Sep 11 10:24:16 EDT 2012
On Tue, Sep 11, 2012 at 06:14:01PM +0400, Pavel Emelyanov wrote:
>
> This all looks very good. One question:
>
> > +static int pty_get_flags(int lfd, int major, int index, TtyInfoEntry *e)
> > +{
> > + int slave;
> > +
> > + e->locked = false;
> > + e->exclusive = false;
> > + e->packet_mode = false;
>
...
> > + /*
> > + * FIXME
> > + *
> > + * PTYs are safe to use packet mode. While there
> > + * is no way to fetch packet mode settings from
> > + * the kernel, without it we see echos missing
> > + * in `screen' application restore.
> > + */
> > + if (ioctl(master, TIOCPKT, &pktmode) < 0) {
> > + pr_perror("Can't set packed mode");
> > + goto err;
> > + }
>
> Why do we set packet mode in the image to false and treat it as true on restore?
That's drawback from kernel. Look, the situation is that -- we can't fetch this
flag from kernel without kernel patching but it's been found that without this
flag set the "screen" doesn't wotk well. Thus I had to do a decision -- either
write this flag as "true" on dump time and put a fixme telling why we do that,
or write it to false since we can't fetch it but treat as true on restore and
add fixme in another code area.
I thought that write "true" in PB image will be more incorrect.
Cyrill
More information about the CRIU
mailing list