From: Arran Cudbard-Bell Date: Sat, 17 Dec 2016 00:45:53 +0000 (-0500) Subject: Exit with an error code reflecting the signal X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b7fd766b54009f2e608f4efd9bda8713de6ad9b7;p=thirdparty%2Ffreeradius-server.git Exit with an error code reflecting the signal --- diff --git a/src/lib/debug.c b/src/lib/debug.c index 99c8dee235c..cff85136c87 100644 --- a/src/lib/debug.c +++ b/src/lib/debug.c @@ -757,7 +757,7 @@ NEVER_RETURNS void fr_fault(int sig) FR_FAULT_LOG("Panic action exited with %i", code); - fr_exit_now(1); + fr_exit_now(128 + sig); } @@ -771,7 +771,7 @@ finish: raise(sig); - fr_exit_now(1); /* Function marked as noreturn */ + fr_exit_now(128 + sig); /* Function marked as noreturn */ } /** Callback executed on fatal talloc error @@ -961,12 +961,12 @@ int fr_fault_setup(char const *cmd, char const *program) debug_state = DEBUGGER_STATE_NOT_ATTACHED; /* i.e. enable signal handlers */ /* * Figure out if we were started under a debugger - */ + */ } else { - if (fr_debug_state < 0) fr_debug_state = fr_get_debug_state(); + if (fr_debug_state < 0) fr_debug_state = fr_get_debug_state(); debug_state = fr_debug_state; } - + talloc_set_log_fn(_fr_talloc_log); /*