[lxc-devel] [lxc/lxc] c87524: lxc-attach: error on -L/--pty-log + redirection

GitHub noreply at github.com
Wed Apr 13 15:19:03 UTC 2016


  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: c87524b77b3abf12f26c39d5b85d26ebc7aeaf97
      https://github.com/lxc/lxc/commit/c87524b77b3abf12f26c39d5b85d26ebc7aeaf97
  Author: Christian Brauner <christian.brauner at mailbox.org>
  Date:   2016-04-13 (Wed, 13 Apr 2016)

  Changed paths:
    M src/lxc/lxc_attach.c

  Log Message:
  -----------
  lxc-attach: error on -L/--pty-log + redirection

pty logging only works correctly when stdout and stderr refer to a pty. If they
do not, we do not dup2() them and lxc_console_cb_con() will never write to the
corresponding log file descriptor.

When redirection on stdout and stderr is used we can safely assume that the user
is already logging to a file or /dev/null and creating an additional pty log
doesn't seem to make sense.

Signed-off-by: Christian Brauner <christian.brauner at mailbox.org>


  Commit: 804bd6e32fe59e94314d84c22eb53ec22f03992d
      https://github.com/lxc/lxc/commit/804bd6e32fe59e94314d84c22eb53ec22f03992d
  Author: Christian Brauner <christian.brauner at mailbox.org>
  Date:   2016-04-13 (Wed, 13 Apr 2016)

  Changed paths:
    M src/tests/lxc-test-lxc-attach

  Log Message:
  -----------
  only execute last test when we are a pty

Signed-off-by: Christian Brauner <christian.brauner at mailbox.org>


  Commit: ba03fa64b9b6e1458393bbba4fbda69b0fd88265
      https://github.com/lxc/lxc/commit/ba03fa64b9b6e1458393bbba4fbda69b0fd88265
  Author: Serge Hallyn <serge at hallyn.com>
  Date:   2016-04-13 (Wed, 13 Apr 2016)

  Changed paths:
    M src/lxc/lxc_attach.c
    M src/tests/lxc-test-lxc-attach

  Log Message:
  -----------
  Merge pull request #970 from brauner/2016-04-13/lxc_attach_log

lxc-attach: error on -L/--pty-log + redirection


Compare: https://github.com/lxc/lxc/compare/e4be55c41f43...ba03fa64b9b6


More information about the lxc-devel mailing list