]> 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)
committerStéphane Graber <stgraber@ubuntu.com>
Thu, 16 Nov 2017 21:49:21 +0000 (16:49 -0500)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/console.c

index b439bc20cb6bf5e6a6104d38afea866066521ddb..dca25e07e86b2b41009873e1173292a5ccd13651 100644 (file)
@@ -590,7 +590,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;