[lxc-devel] [lxc/lxc] d0dacf: lxc_monitord: make lxc-monitord async signal safe

GitHub noreply at github.com
Sun Nov 27 03:56:58 UTC 2016


  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: d0dacf05a66b8f791650855673782649ee36a4a7
      https://github.com/lxc/lxc/commit/d0dacf05a66b8f791650855673782649ee36a4a7
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2016-11-27 (Sun, 27 Nov 2016)

  Changed paths:
    M src/lxc/lxc_monitord.c

  Log Message:
  -----------
  lxc_monitord: make lxc-monitord async signal safe

Before lxc_monitord called lxc_monitord_cleanup() from a signal handler.  This
function calls a bunch of async signal unsafe functions and basically begs for
deadlocks. This commit switches lxc-monitord to using sigsetjmp() and
siglongjmp() in the signal handler to jump to a cleanup label that call
lxc_monitord_cleanup(). In this way, we avoid using async signal unsafe
functions.

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>


  Commit: 1e0a00460a6a4e3773f44be4b0e9f8558ac5e458
      https://github.com/lxc/lxc/commit/1e0a00460a6a4e3773f44be4b0e9f8558ac5e458
  Author: Stéphane Graber <stgraber at stgraber.org>
  Date:   2016-11-26 (Sat, 26 Nov 2016)

  Changed paths:
    M src/lxc/lxc_monitord.c

  Log Message:
  -----------
  Merge pull request #1327 from brauner/2016-11-26/make_lxc_monitord_async_signal_safe

lxc_monitord: make lxc-monitord async signal safe


Compare: https://github.com/lxc/lxc/compare/8d58eea994be...1e0a00460a6a


More information about the lxc-devel mailing list