[CRIU] Re: [PATCH 5/6] tty: Restore orphan slavery peers

Cyrill Gorcunov gorcunov at openvz.org
Fri Sep 14 08:37:10 EDT 2012


On Fri, Sep 14, 2012 at 04:14:49PM +0400, Pavel Emelyanov wrote:
> >  
> >  	mark_pipe_master();
> > +	ret = tty_setup_orphan_slavery(&opts);
> 
> Why not call it from collect_tty()?

I need fdinfo to be already assigned to figure out
who from slave list will be opening fake master.

> > @@ -80,6 +80,9 @@ struct tty_info {
> >  
> >  	struct list_head		sibling;
> >  	int				major;
> > +
> > +	bool				create;
> > +	bool				noparams;
> 
> Unused.

create is used tty_open, noparams indeed is not needed
in this patch. I'll update.

> > -	if (verify_termios(info->tfe->id, info->tie->termios_locked) ||
> > -	    verify_termios(info->tfe->id, info->tie->termios))
> > -		return -1;
> > +		info->noparams = true;
> > +	} else {
> > +		if (verify_termios(info->tfe->id, info->tie->termios_locked) ||
> > +		    verify_termios(info->tfe->id, info->tie->termios))
> > +			return -1;
> > +	}
> 
> What the heck is that?

Sorry, it's a bit of mess from extended verification. I'll drop it, thanks!

> > +	return 0;
> 
> Why not do it with tty_setup_slavery?

We've two stages -- 1st when we don't have fdinfo assigned (early stage)
at this time we bind master/slave peers and figure out control terminal.

The second stage is when all fds are assigned and we figures out which
fake master we might need.

	Cyrill


More information about the CRIU mailing list