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

index 8f6203f000135bad440ea33b13fc4fe4510ad3dc..72c01b192a96d19bd04c20208973ae3689a8489c 100644 (file)
@@ -616,7 +616,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;