From: "Serge E. Hallyn" <serge.hallyn-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
To: Sukadev Bhattiprolu
<sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
Cc: Containers
<containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>
Subject: Re: C/R of termios
Date: Mon, 13 Dec 2010 08:38:41 -0600 [thread overview]
Message-ID: <20101213143841.GF17546@hallyn.com> (raw)
In-Reply-To: <20101209012820.GA10001-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Quoting Sukadev Bhattiprolu (sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org):
> 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.
next prev parent reply other threads:[~2010-12-13 14:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-09 1:28 C/R of termios Sukadev Bhattiprolu
[not found] ` <20101209012820.GA10001-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-12-13 14:38 ` Serge E. Hallyn [this message]
2010-12-13 14:54 ` Oren Laadan
[not found] ` <4D063396.3090207-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2010-12-13 18:27 ` Sukadev Bhattiprolu
[not found] ` <20101213182706.GC2035-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-12-13 19:21 ` Oren Laadan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101213143841.GF17546@hallyn.com \
--to=serge.hallyn-z7wlfzj8ewms+fvcfc7uqw@public.gmane.org \
--cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.