]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
"busy" field set to 1 instead of 0
authorRachid Koucha <47061324+Rachid-Koucha@users.noreply.github.com>
Fri, 6 Dec 2019 14:04:31 +0000 (15:04 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sat, 7 Dec 2019 15:50:38 +0000 (16:50 +0100)
"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 <rachid.koucha@gmail.com>
src/lxc/conf.c

index 6e8638b3c20ce5988403a63a8293c89b484a777b..e2098fb39604392b8b33e2160830e2eb4c647707 100644 (file)
@@ -981,7 +981,7 @@ int lxc_allocate_ttys(struct lxc_conf *conf)
                        SYSWARN("Failed to set FD_CLOEXEC flag on slave fd %d of "
                                "tty device \"%s\"", tty->slave, tty->name);
 
-               tty->busy = 0;
+               tty->busy = -1;
        }
 
        INFO("Finished creating %zu tty devices", ttys->max);