Skip to content

Commit

Permalink
attach: use lxc_terminal_signal_sigmask_safe_blocked()
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Oct 19, 2020
1 parent 1748c4b commit f59f2f9
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/lxc/attach.c
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit f59f2f9

Please sign in to comment.