]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
console: Move welcome message down a bit
authorStéphane Graber <stgraber@ubuntu.com>
Thu, 16 Nov 2017 22:13:27 +0000 (17:13 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Thu, 16 Nov 2017 22:13:27 +0000 (17:13 -0500)
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/console.c

index dca25e07e86b2b41009873e1173292a5ccd13651..dcbe02edd8bf070e5d734fef5c4700f5274b88bf 100644 (file)
@@ -665,15 +665,6 @@ int lxc_console(struct lxc_container *c, int ttynum,
                goto err1;
        }
 
-       if (ts->escape >= 1) {
-               fprintf(stderr, "\n"
-                       "Connected to tty %1$d\n"
-                       "Type <Ctrl+%2$c q> to exit the console, "
-                       "<Ctrl+%2$c Ctrl+%2$c> to enter Ctrl+%2$c itself\n",
-                       ttynum, 'a' + escape - 1);
-       }
-
-       ret = setsid();
        if (ret)
                INFO("already group leader");
 
@@ -719,6 +710,15 @@ int lxc_console(struct lxc_container *c, int ttynum,
                goto err4;
        }
 
+       if (ts->escape >= 1) {
+               fprintf(stderr, "\n"
+                       "Connected to tty %1$d\n"
+                       "Type <Ctrl+%2$c q> to exit the console, "
+                       "<Ctrl+%2$c Ctrl+%2$c> to enter Ctrl+%2$c itself\n",
+                       ttynum, 'a' + escape - 1);
+       }
+
+       ret = setsid();
        ret = lxc_mainloop(&descr, -1);
        if (ret) {
                ERROR("mainloop returned an error");