From: Rachid Koucha <47061324+Rachid-Koucha@users.noreply.github.com> Date: Fri, 6 Dec 2019 13:59:52 +0000 (+0100) Subject: Init "busy" field to -1 as 0 is valid fd X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a0a707e2aa90cd2dd3eef35d676a5b5dfa0ef42c;p=thirdparty%2Flxc.git 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: Rachid Koucha --- diff --git a/src/lxc/start.c b/src/lxc/start.c index 5fa8852f5..b496b9313 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -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)