[CRIU] [PATCH 2/3] restore: reserve the service descriptor for a control tty

Andrew Vagin avagin at parallels.com
Mon Mar 18 14:48:10 EDT 2013


On Mon, Mar 18, 2013 at 10:28:56PM +0400, Pavel Emelyanov wrote:
> On 03/18/2013 09:40 PM, Andrey Vagin wrote:
> > I'm really lucky.
> > 
> > prepare_ctl_tty:
> > 	e->fd           = reserve_service_fd(CTL_TTY_OFF); // -1
	e->fd           = get_service_fd(CTL_TTY_OFF); // -1
> > 
> > send_fd_to_self:
> > if (dup2(fd, dfd) != dfd) { // -1 == -1
> > 
> > tty_restore_ctl_terminal:
> > 	if (!is_service_fd(fd, CTL_TTY_OFF))
> > 		return fd == get_service_fd(type); // -1 = -1
> > 
> > Signed-off-by: Andrey Vagin <avagin at openvz.org>
> 
> I don't understand this changelog. It obviously describes how things
> work _after_ patch (due to reserve_service_fd presence) and don't
> describe what problem is being fixed.

Actually I wanted to describe a problem. Sorry for the mess.
get_service_fd should be instead of reserve_service_fd in this
description.


More information about the CRIU mailing list