]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Allow escape prefix to escape itself
authorIvan Vilata i Balaguer <ivan@selidor.net>
Tue, 31 Jul 2012 14:01:27 +0000 (16:01 +0200)
committerDaniel Lezcano <daniel.lezcano@free.fr>
Tue, 31 Jul 2012 14:01:27 +0000 (16:01 +0200)
 (Closes: #659011).

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/lxc_console.c

index 5a1e45abdf8a89f925a3bfdb289c161b17e53981..d09c6882ea650daabb91f950e44a1e71a32f18b3 100644 (file)
@@ -144,7 +144,7 @@ static int stdin_handler(int fd, void *data, struct lxc_epoll_descr *descr)
        }
 
        /* we want to exit the console with Ctrl+a q */
-       if (c == my_args.escape) {
+       if (c == my_args.escape && !wait4q) {
                wait4q = !wait4q;
                return 0;
        }
@@ -202,7 +202,9 @@ int main(int argc, char *argv[])
        if (err)
                goto out;
 
-       fprintf(stderr, "\nType <Ctrl+%c q> to exit the console\n",
+       fprintf(stderr, "\n\
+Type <Ctrl+%1$c q> to exit the console, \
+<Ctrl+%1$c Ctrl+%1$c> to enter Ctrl+%1$c itself\n",
                 'a' + my_args.escape - 1);
 
        err = setsid();