Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: 341c2aed462c64e98a083b9ecd2e519ef4104cfd
      https://github.com/lxc/lxc/commit/341c2aed462c64e98a083b9ecd2e519ef4104cfd
  Author: Christian Brauner <christian.brau...@mailbox.org>
  Date:   2016-04-07 (Thu, 07 Apr 2016)

  Changed paths:
    M src/lxc/console.c
    M src/lxc/console.h
    M src/lxc/lxc_attach.c

  Log Message:
  -----------
  lxc-attach: attach even without sigwinch handler

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: Christian Brauner <christian.brau...@mailbox.org>


  Commit: aa3ea4d3ccfccfc4c3e8b041c12ce8da3dc9e64d
      https://github.com/lxc/lxc/commit/aa3ea4d3ccfccfc4c3e8b041c12ce8da3dc9e64d
  Author: Serge Hallyn <se...@hallyn.com>
  Date:   2016-04-07 (Thu, 07 Apr 2016)

  Changed paths:
    M src/lxc/console.c
    M src/lxc/console.h
    M src/lxc/lxc_attach.c

  Log Message:
  -----------
  Merge pull request #951 from brauner/2016-04-07/lxc_attach_sigwinch_handler

lxc-attach: attach even without sigwinch handler


Compare: https://github.com/lxc/lxc/compare/823765e50bf4...aa3ea4d3ccfc
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to