[CRIU] Re: [PATCH 2/2] tty: Add checkpoint/restore for ttys

Cyrill Gorcunov gorcunov at openvz.org
Sun Jun 17 15:03:11 EDT 2012


On Sun, Jun 17, 2012 at 10:33:31PM +0400, Andrew Vagin wrote:
> Are you going to restore a controlling terminal?
> >> The System V approach is that the first tty opened by the process
> >> becomes its controlling tty.
> >> The BSD approach is that one has to explicitly call
> >> ioctl(fd, TIOCSCTTY, ...);

It seems someone replied to this email but it didn't hit c/r
mailing list? Because I don't see previous conversation here.

At moment I've addressed unix98 ttys which have been using
by 'screen'. The code will be extended once more terminals
needed.

Thus BSD approach is not yet addressed.

> On Fri, Jun 15, 2012 at 01:32:46PM +0400, Cyrill Gorcunov wrote:
> > At moment it handles unix98 ttys only. At least
> > that's what being tested with 'screen' session.
> > 
> > The base idea is to save/restore tty parameters with
> > TCGETS/TCSETS ioctls.
> 
> Need more details...
> 
> Why do we need want_transport()?

Andrew, please, I beg you -- learn (!) to *TRIM( messages and quote
only the parts you're interesed in.

As to want_transport -- when pty is opened the kernel generates
slave pty peer by self, but master and slave peer might be in different
processes. That's what I see with screen -- the master opened in one
process while slave pty opened in children, and actually it could
be the reverse. So if I find such situation, the children must wait
until master opened and connect only when master is ready.

	Cyrill


More information about the CRIU mailing list