Commit 6ce01477 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Check if SIGPWR is defined, for systems that don't support it (ie. MacOSX).

parent 1e9d11d1
......@@ -673,9 +673,11 @@ void catch_sig_stop(int sig_num)
case SIGHUP:
std::cerr << "SIGHUP (Hangup).";
#ifdef SIGPWR
case SIGPWR:
std::cerr << "SIGPWR (Power failure restart).";
std::cerr << "SIGSEGV (Segmentation fault). "
<< "There's a bug somewhere in the program. Go fix it.";
......@@ -710,7 +712,9 @@ void GraphInterface::InitSignalHandling()
signal(SIGTERM, catch_sig_stop);
signal(SIGQUIT, catch_sig_stop);
signal(SIGHUP, catch_sig_stop);
#ifdef SIGPWR
signal(SIGPWR, catch_sig_stop);
signal(SIGSEGV, catch_sig_stop);
signal(SIGBUS, catch_sig_stop);
signal(SIGFPE, catch_sig_stop);
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