From: Ivan Vilata i Balaguer Date: Tue, 31 Jul 2012 14:01:27 +0000 (+0200) Subject: Allow escape prefix to escape itself X-Git-Tag: lxc-0.8.0~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f52fd0763d212a91472a0e2271f6db9aab03f78;p=thirdparty%2Flxc.git Allow escape prefix to escape itself (Closes: #659011). Signed-off-by: Serge Hallyn Signed-off-by: Daniel Lezcano --- diff --git a/src/lxc/lxc_console.c b/src/lxc/lxc_console.c index 5a1e45abd..d09c6882e 100644 --- a/src/lxc/lxc_console.c +++ b/src/lxc/lxc_console.c @@ -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 to exit the console\n", + fprintf(stderr, "\n\ +Type to exit the console, \ + to enter Ctrl+%1$c itself\n", 'a' + my_args.escape - 1); err = setsid();