]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Merge pull request #1576 from lifeng68/Modifytty
authorChristian Brauner <christian.brauner@ubuntu.com>
Sat, 27 May 2017 02:04:31 +0000 (12:04 +1000)
committerGitHub <noreply@github.com>
Sat, 27 May 2017 02:04:31 +0000 (12:04 +1000)
DO NOT add the handles of adjust winsize when the 'stdin' is not a tty

1  2 
src/lxc/console.c

index 3c593609be7d93e63f65ea96883a285af7f827b6,61f9c7a490bf751351b05492c0fe45f57a4205d2..803c64f5c0e342bc9042e9d5e736a172e4ff93e5
@@@ -697,10 -689,11 +703,12 @@@ int lxc_console(struct lxc_container *c
        ts->escape = escape;
        ts->winch_proxy = c->name;
        ts->winch_proxy_lxcpath = c->config_path;
 +      ts->stdoutfd = stdoutfd;
  
-       lxc_console_winsz(stdinfd, masterfd);
-       lxc_cmd_console_winch(ts->winch_proxy, ts->winch_proxy_lxcpath);
+       if (istty) {
+               lxc_console_winsz(stdinfd, masterfd);
+               lxc_cmd_console_winch(ts->winch_proxy, ts->winch_proxy_lxcpath);
+       }
  
        ret = lxc_mainloop_open(&descr);
        if (ret) {