From: Christian Brauner Date: Fri, 10 Nov 2017 18:51:57 +0000 (+0100) Subject: console: report detach message on demand X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9493cb92d82b09d1be4919884944ff91aff0122f;p=thirdparty%2Flxc.git console: report detach message on demand When users pass -1 there's there won't be an escape sequence to exit the console so no need to print a misleading info message about how to detach. Signed-off-by: Christian Brauner --- diff --git a/src/lxc/console.c b/src/lxc/console.c index 536136de6..b439bc20c 100644 --- a/src/lxc/console.c +++ b/src/lxc/console.c @@ -665,11 +665,13 @@ int lxc_console(struct lxc_container *c, int ttynum, goto err1; } - fprintf(stderr, "\n" + if (ts->escape >= 1) { + fprintf(stderr, "\n" "Connected to tty %1$d\n" "Type to exit the console, " " to enter Ctrl+%2$c itself\n", ttynum, 'a' + escape - 1); + } ret = setsid(); if (ret)