Commit 3f52fd07 by Ivan Vilata i Balaguer Committed by Daniel Lezcano

Allow escape prefix to escape itself

(Closes: #659011). Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com> Signed-off-by: 's avatarDaniel Lezcano <dlezcano@fr.ibm.com>
parent 0f6f3a5a
...@@ -144,7 +144,7 @@ static int stdin_handler(int fd, void *data, struct lxc_epoll_descr *descr) ...@@ -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 */ /* we want to exit the console with Ctrl+a q */
if (c == my_args.escape) { if (c == my_args.escape && !wait4q) {
wait4q = !wait4q; wait4q = !wait4q;
return 0; return 0;
} }
...@@ -202,7 +202,9 @@ int main(int argc, char *argv[]) ...@@ -202,7 +202,9 @@ int main(int argc, char *argv[])
if (err) if (err)
goto out; 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); 'a' + my_args.escape - 1);
err = setsid(); err = setsid();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment