Skip to content

Commit

Permalink
Merge pull request #2340 from brauner/2018-05-22/fix_init_cmd
Browse files Browse the repository at this point in the history
lxc-init: skip signals that can't be caught
  • Loading branch information
stgraber committed May 23, 2018
2 parents cd7cf94 + 11c69d5 commit f6c94d9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lxc/cmd/lxc_init.c
Expand Up @@ -327,6 +327,11 @@ int main(int argc, char *argv[])
/* restore default signal handlers */
for (i = 1; i < NSIG; i++) {
sighandler_t sigerr;

if (i == SIGILL || i == SIGSEGV || i == SIGBUS ||
i == SIGSTOP || i == SIGKILL || i == 32 || i == 33)
continue;

sigerr = signal(i, SIG_DFL);
if (sigerr == SIG_ERR) {
DEBUG("%s - Failed to reset to default action "
Expand Down

0 comments on commit f6c94d9

Please sign in to comment.