[Devel] Re: C/R of termios
Serge E. Hallyn
serge.hallyn at canonical.com
Mon Dec 13 06:38:41 PST 2010
Quoting Sukadev Bhattiprolu (sukadev at linux.vnet.ibm.com):
> Oren,
>
> Any reason we only checkpoint/restore a 'struct termio' instead of a
> 'struct termios' ?
>
> AFAICT, 'struct termios' seems to supersede 'struct termio' (i.e includes
> all fields of 'struct termio' plus more). The TCGETS ioctl and tcgetattr()
> interface return a 'struct termios' to user space.
>
> The man page termio(7) says the 'struct termio' interface is obsolete.
>
> The kernel uses 'struct ktermios' to represent the attributes internally.
> So shouldn't we checkpoint/restore the 'struct ktermios' object ?
>
> If application uses legacy interface (TCGETA/TCSETA with 'struct termio')
> the kernel converts the 'struct ktermios' to the 'struct termio' in
> kernel_termios_to_user_termio(). So we should be fine if we C/R the
> ktermios object right ?
>
> Here is a quick hack, just for reference. With this hack, I can C/R an
> app that does tcgetattr() of a pty before/after checkpoint.
Looks reasonable to me.
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list