From: Christian Brauner Date: Wed, 2 Sep 2020 07:28:32 +0000 (+0200) Subject: attach: use lxc_terminal_signal_sigmask_safe_blocked() X-Git-Tag: lxc-5.0.0~360^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3941f32de6e82aa5161734e9693b7fdec015056;p=thirdparty%2Flxc.git attach: use lxc_terminal_signal_sigmask_safe_blocked() Signed-off-by: Christian Brauner --- diff --git a/src/lxc/attach.c b/src/lxc/attach.c index 368dd41ad..9528d5406 100644 --- a/src/lxc/attach.c +++ b/src/lxc/attach.c @@ -1384,14 +1384,10 @@ int lxc_attach(struct lxc_container *container, lxc_attach_exec_t exec_function, if (pid == 0) { if (options->attach_flags & LXC_ATTACH_TERMINAL) { - if (terminal.tty_state) - { - ret = pthread_sigmask(SIG_SETMASK, - &terminal.tty_state->oldmask, NULL); - if (ret < 0) { - SYSERROR("Failed to reset signal mask"); - _exit(EXIT_FAILURE); - } + ret = lxc_terminal_signal_sigmask_safe_blocked(&terminal); + if (ret < 0) { + SYSERROR("Failed to reset signal mask"); + _exit(EXIT_FAILURE); } }