Commit c3941f32 by Christian Brauner Committed by Scott Parlane

attach: use lxc_terminal_signal_sigmask_safe_blocked()

parent 3e3f79bd
...@@ -1384,16 +1384,12 @@ int lxc_attach(struct lxc_container *container, lxc_attach_exec_t exec_function, ...@@ -1384,16 +1384,12 @@ int lxc_attach(struct lxc_container *container, lxc_attach_exec_t exec_function,
if (pid == 0) { if (pid == 0) {
if (options->attach_flags & LXC_ATTACH_TERMINAL) { if (options->attach_flags & LXC_ATTACH_TERMINAL) {
if (terminal.tty_state) ret = lxc_terminal_signal_sigmask_safe_blocked(&terminal);
{
ret = pthread_sigmask(SIG_SETMASK,
&terminal.tty_state->oldmask, NULL);
if (ret < 0) { if (ret < 0) {
SYSERROR("Failed to reset signal mask"); SYSERROR("Failed to reset signal mask");
_exit(EXIT_FAILURE); _exit(EXIT_FAILURE);
} }
} }
}
ret = attach_child_main(&payload); ret = attach_child_main(&payload);
if (ret < 0) if (ret < 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment