1. 18 Apr, 2016 7 commits
    • Ignore temporary files generated by doxygen · ad87e08c
      staticfox authored
      Signed-off-by: 's avatarMatt Ullman <staticfox@staticfox.net>
    • adapt lxc-attach tests & add test for pty logging · 74d4266f
      Christian Brauner authored
      The current tests for lxc-attach pty allocation and I/O redirection rely on the
      standard file descriptors of the test script to refer to a pty. If they do not
      the tests are effectively useless with respect to pty allocation. We need a test
      environment with the standard file descriptors refering to a pty as well. One
      solution is to run this test under the script command.
      
      This commit also adds a test whether pty logging works. This test is only
      executed when all standard file descriptors refer to a pty.
      Signed-off-by: 's avatarChristian Brauner <christian.brauner@mailbox.org>
    • cgfsng: defer to cgfs if needed subsystems are not available · 004fc784
      Serge Hallyn authored
      This requires us to check that at cgfsng_ops_init, rather than
      cgfs_init.  Cache the hierarchy and cgroup.use info globally
      rather than putting it into the per-container info, as cgmanager
      does.  This is ok as both cgroup.use and the list of usable
      hierarchies are in fact global to a lxc run.
      
      Closes #952
      Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
    • fix lxc_console_cb_tty_*() · 08be058f
      Christian Brauner authored
      Clean exit when read() == -1 && errno != EINTR or read() == 0.
      Signed-off-by: 's avatarChristian Brauner <christian.brauner@mailbox.org>
    • use lxc_read_nointr() and lxc_write_nointr() · 32bf1787
      Christian Brauner authored
      Using EPOLLHUP to determine when to exit the loop is unreliable. Let's exit
      clean when read() returns -1 && errno != EINTR or 0.
      Signed-off-by: 's avatarChristian Brauner <christian.brauner@mailbox.org>
    • simplify pty allocation and implement pty logging · d3e3b188
      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>
    • lxc-attach: attach even without sigwinch handler · e73bcbbe
      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>
  2. 06 Apr, 2016 7 commits
  3. 05 Apr, 2016 9 commits
  4. 04 Apr, 2016 2 commits
  5. 03 Apr, 2016 9 commits
  6. 02 Apr, 2016 6 commits