[CRIU] Re: [PATCH 14/14] tty, restore: Migrate tty slave peer connection

Cyrill Gorcunov gorcunov at openvz.org
Mon Oct 15 12:34:35 EDT 2012


On Mon, Oct 15, 2012 at 08:25:57PM +0400, Pavel Emelyanov wrote:
> On 10/15/2012 08:20 PM, Cyrill Gorcunov wrote:
> > On Mon, Oct 15, 2012 at 08:12:33PM +0400, Pavel Emelyanov wrote:
> >>> +	if (likely(slave->tie->termios)) {
> >>> +		fd = dup(get_service_fd(SELF_STDIN_OFF));
> >>> +		if (fd < 0) {
> >>> +			pr_perror("Can't dup SELF_STDIN_OFF");
> >>> +			return -1;
> >>> +		}
> >>> +		pr_info("Migrated slave peer %x -> to fd %d\n",
> >>> +			slave->tfe->id, fd);
> >>
> >> Presence of termios on _proper_ slaves denotes a corruption in the image. You turn
> >> this into a sign that a slave is unpaired, which is wrong.
> > 
> > Look, this routine is called IIF there is NO master peer on this index,
> 
> No, this routine is called for slaves.

Yes, it's called on _unpaired_ slave. I'll simplify the code since seems
what's done in the patch do confuse code readers.


More information about the CRIU mailing list