]> 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)
committerGitHub <noreply@github.com>
Fri, 6 Dec 2019 14:04:31 +0000 (15:04 +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 b192c7550ac88b0d9c16918c877de8271559ddda..03f4d69587e8fe539020d3dac5d0e36028f5f708 100644 (file)
@@ -1006,7 +1006,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);