From: Christian Brauner Date: Sat, 27 May 2017 02:04:31 +0000 (+1000) Subject: Merge pull request #1576 from lifeng68/Modifytty X-Git-Tag: lxc-2.1.0~116 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=59e5238e176f1e8dd2c00c83aa1d7383316fd2ca;p=thirdparty%2Flxc.git Merge pull request #1576 from lifeng68/Modifytty DO NOT add the handles of adjust winsize when the 'stdin' is not a tty --- 59e5238e176f1e8dd2c00c83aa1d7383316fd2ca diff --cc src/lxc/console.c index 3c593609b,61f9c7a49..803c64f5c --- a/src/lxc/console.c +++ b/src/lxc/console.c @@@ -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) {