Skip to content

Commit

Permalink
Merge pull request #2677 from brauner/2018-10-07/attach_reset_signal_…
Browse files Browse the repository at this point in the history
…mask

attach: reset signal mask
  • Loading branch information
stgraber committed Oct 7, 2018
2 parents acf67bc + f157b05 commit 8f355ca
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/lxc/attach.c
Expand Up @@ -1483,6 +1483,15 @@ int lxc_attach(const char *name, const char *lxcpath,
}

if (pid == 0) {
if (options->attach_flags & LXC_ATTACH_TERMINAL) {
ret = pthread_sigmask(SIG_SETMASK,
&terminal.tty_state->oldmask, NULL);
if (ret < 0) {
SYSERROR("Failed to reset signal mask");
_exit(EXIT_FAILURE);
}
}

ret = attach_child_main(&payload);
if (ret < 0)
ERROR("Failed to exec");
Expand Down

0 comments on commit 8f355ca

Please sign in to comment.