diff --git a/src/lxc/attach.c b/src/lxc/attach.c index f63331ede..80c41fe26 100644 --- a/src/lxc/attach.c +++ b/src/lxc/attach.c @@ -459,7 +459,7 @@ static char *lxc_attach_getpwshell(uid_t uid) close(STDERR_FILENO); } else { (void)dup3(fd, STDIN_FILENO, O_CLOEXEC); - (void)dup3(fd, STDOUT_FILENO, O_CLOEXEC); + (void)dup3(fd, STDERR_FILENO, O_CLOEXEC); close(fd); }