We should use the fd specified by caller. Signed-off-by: Qiang Huang <h.huangqi...@huawei.com> --- src/lxc/lxc_console.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/lxc/lxc_console.c b/src/lxc/lxc_console.c index 820794a..688de80 100644 --- a/src/lxc/lxc_console.c +++ b/src/lxc/lxc_console.c @@ -109,7 +109,7 @@ static int setup_tios(int fd, struct termios *newtios, struct termios *oldtios) } /* Get current termios */ - if (tcgetattr(0, oldtios)) { + if (tcgetattr(fd, oldtios)) { SYSERROR("failed to get current terminal settings"); return -1; } @@ -125,7 +125,7 @@ static int setup_tios(int fd, struct termios *newtios, struct termios *oldtios) newtios->c_cc[VTIME] = 0; /* Set new attributes */ - if (tcsetattr(0, TCSAFLUSH, newtios)) { + if (tcsetattr(fd, TCSAFLUSH, newtios)) { ERROR("failed to set new terminal settings"); return -1; } -- 1.7.1 ------------------------------------------------------------------------------ Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may _______________________________________________ Lxc-devel mailing list Lxc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-devel