1. 08 Feb, 2017 1 commit
    • lxc_setup_tios(): Ignore SIGTTOU and SIGTTIN signals · 4dc96430
      Thomas Jarosch authored
      Prevent an endless loop while executing lxc-attach in the background:
      
      The kernel might fire SIGTTOU while an ioctl() in tcsetattr()
      is executed. When the ioctl() is resumed and retries,
      the signal handler interrupts it again.
      
      We can't configure the TTY to stop sending
      the signals in the first place since that
      is a modification/write to the TTY already.
      
      Still we clear the TOSTOP flag to prevent further signals.
      
      Command to reproduce the hang:
      ----------------------------
      cat > lxc_hang.sh << EOF
      /usr/bin/timeout 5s /usr/bin/lxc-attach -n SOMECONTAINER -- /bin/true
      EOF
      sh lxc_hang.sh    # hangs
      ----------------------------
      Signed-off-by: 's avatarThomas Jarosch <thomas.jarosch@intra2net.com>
  2. 06 Feb, 2017 2 commits
  3. 02 Feb, 2017 7 commits
  4. 30 Jan, 2017 2 commits
  5. 29 Jan, 2017 3 commits
  6. 28 Jan, 2017 1 commit
  7. 27 Jan, 2017 2 commits
  8. 26 Jan, 2017 2 commits
    • Merge pull request #1392 from cjwatson/start-ephemeral-python32 · 42dc0de4
      Stéphane Graber authored
      Make lxc-start-ephemeral Python 3.2-compatible
    • Make lxc-start-ephemeral Python 3.2-compatible · e0e34b7e
      Colin Watson authored
      On Ubuntu 12.04 LTS with Python 3.2, `lxc-start-ephemeral` breaks as
      follows:
      
          Traceback (most recent call last):
            File "/usr/bin/lxc-start-ephemeral", line 371, in attach_as_user
            File "/usr/lib/python3.2/subprocess.py", line 515, in check_output
            File "/usr/lib/python3.2/subprocess.py", line 732, in __init__
          LookupError: unknown encoding: ANSI_X3.4-1968
      
      This is because `universal_newlines=True` causes `subprocess` to use
      `io.TextIOWrapper`, and in versions of Python earlier than 3.3 that
      fetched the preferred encoding using `locale.getpreferredencoding()`
      rather than `locale.getpreferredencoding(False)`, thereby changing the
      locale and causing codecs to be reloaded.  However, `attach_as_user`
      runs inside the container and thus can't rely on having access to the
      same Python standard library on disk.
      
      The workaround is to decode by hand instead, avoiding the temporary
      change of locale.
      Signed-off-by: 's avatarColin Watson <cjwatson@ubuntu.com>
  9. 21 Jan, 2017 2 commits
  10. 12 Jan, 2017 2 commits
  11. 11 Jan, 2017 2 commits
  12. 07 Jan, 2017 5 commits
  13. 04 Jan, 2017 6 commits
  14. 03 Jan, 2017 2 commits
  15. 29 Dec, 2016 1 commit