1. 08 Apr, 2016 1 commit
    • simplify pty allocation and implement pty logging · da41561c
      Christian Brauner authored
      lxc-attach allocated a pty in a manner that relied on ts->stdinfd and
      ts->stdoutfd to be set. We had to resort to a trick to get it working when
      output is redirected. The new implementation gets rid of the black magic and
      also simplifies the code.
      
      This commit also implements pty logging for lxc-attach. Users will now be able
      to log commands and corresponding output to a file given that lxc-attach
      allocates a pty.
      Signed-off-by: 's avatarChristian Brauner <christian.brauner@mailbox.org>
  2. 07 Apr, 2016 2 commits
    • Merge pull request #951 from brauner/2016-04-07/lxc_attach_sigwinch_handler · aa3ea4d3
      Serge Hallyn authored
      lxc-attach: attach even without sigwinch handler
    • lxc-attach: attach even without sigwinch handler · 341c2aed
      Christian Brauner authored
      lxc_console_create() calls lxc_console_peer_default() which in turn calls
      lxc_console_sigwinch_init() which sets up the lxc_tty_state struct for the
      current pty. Prior to this commit lxc_console_sigwinch_init() would consider
      failures to install a SIGWINCH handler fatal and and return NULL. This commit
      makes failures to install a SIGWINCH handler non-fatal. In such cases the
      lxc_tty_state struct will still be set up but the sigfd member, which contains
      the fd which receives SIGWINCH events, will be set to -1. (This also entails
      that the sigset_t oldmaks field is meaningless.) Callers of
      lxc_console_sigwinch_init() and lxc_console_sigwinch_fini() should thus make
      sure that sigfd >= 0 or sigfd != -1 before trying to register a SIGWINCH handler
      in e.g. an lxc_mainloop or resetting the sigmask (cf. lxc_attach.c).
      
      These changes also imply that lxc_console_sigwinch_init() only fails with
      ENOMEM. Thus, all cases where lxc_console_sigwinch_init() returns NULL are to be
      considered fatal. This wasn't the case before this commit.
      Signed-off-by: 's avatarChristian Brauner <christian.brauner@mailbox.org>
  3. 06 Apr, 2016 7 commits
  4. 05 Apr, 2016 9 commits
  5. 04 Apr, 2016 2 commits
  6. 03 Apr, 2016 9 commits
  7. 02 Apr, 2016 6 commits
  8. 31 Mar, 2016 4 commits