]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
console: use correct escape sequence check 1919/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Sat, 11 Nov 2017 22:05:33 +0000 (23:05 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sat, 11 Nov 2017 22:06:33 +0000 (23:06 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/console.c

index 2161657203ca0e518576d2a78d02b679e4d47507..4af0481ca7fa333137202b30753fb59dbf96ffeb 100644 (file)
@@ -718,7 +718,7 @@ int lxc_console_cb_tty_stdin(int fd, uint32_t events, void *cbdata,
        if (lxc_read_nointr(ts->stdinfd, &c, 1) <= 0)
                return 1;
 
-       if (ts->escape != -1) {
+       if (ts->escape >= 1) {
                /* we want to exit the console with Ctrl+a q */
                if (c == ts->escape && !ts->saw_escape) {
                        ts->saw_escape = 1;