Unverified Commit a0a707e2 by Rachid Koucha Committed by Christian Brauner

Init "busy" field to -1 as 0 is valid fd

"busy" field is assigned with the command socket descriptor when the terminal is in use. So, use "-1" to disable it. Signed-off-by: 's avatarRachid Koucha <rachid.koucha@gmail.com>
parent 8348e424
......@@ -1489,11 +1489,11 @@ static int lxc_recv_ttys_from_child(struct lxc_handler *handler)
break;
tty = &ttys->tty[i];
tty->busy = 0;
tty->busy = -1;
tty->master = ttyfds[0];
tty->slave = ttyfds[1];
TRACE("Received pty with master fd %d and slave fd %d from "
"parent", tty->master, tty->slave);
"child", tty->master, tty->slave);
}
if (ret < 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment