Skip to content

Commit

Permalink
lxc-init: skip signals that can't be caught
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 May 22, 2018
1 parent 394769b commit 11c69d5
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 11c69d5

Please sign in to comment.