Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Handle signal SIGILL for ARM
  • Loading branch information
perexg committed Aug 20, 2014
1 parent 8677a62 commit 7fe33f7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main.c
Expand Up @@ -181,6 +181,16 @@ handle_sigpipe(int x)
return;
}

static void
handle_sigill(int x)
{
/* Note that on some platforms, the SSL library tries */
/* to determine the CPU capabilities with possible */
/* unknown instructions */
tvhwarn("CPU", "Illegal instruction handler (might be OK)");
signal(SIGILL, handle_sigill);
}

void
doexit(int x)
{
Expand Down Expand Up @@ -678,6 +688,7 @@ main(int argc, char **argv)
tvhinfo("main", "Log started");

signal(SIGPIPE, handle_sigpipe); // will be redundant later
signal(SIGILL, handle_sigill); // see handler..

tcp_server_preinit(opt_ipv6);
http_server_init(opt_bindaddr); // bind to ports only
Expand Down

0 comments on commit 7fe33f7

Please sign in to comment.