projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
821eb3a
)
Only register signal handlers if we have a PANIC_ACTION set
author
Arran Cudbard-Bell
<a.cudbardb@freeradius.org>
Wed, 25 Jun 2014 20:28:33 +0000
(21:28 +0100)
committer
Arran Cudbard-Bell
<a.cudbardb@freeradius.org>
Wed, 25 Jun 2014 20:28:43 +0000
(21:28 +0100)
src/lib/debug.c
patch
|
blob
|
history
diff --git
a/src/lib/debug.c
b/src/lib/debug.c
index
e1f0125
..
f4c1ad4
100644
(file)
--- a/
src/lib/debug.c
+++ b/
src/lib/debug.c
@@
-676,24
+676,25
@@
int fr_fault_setup(char const *cmd, char const *program)
/* Unsure what the side effects of changing the signal handler mid execution might be */
if (!setup) {
/* Unsure what the side effects of changing the signal handler mid execution might be */
if (!setup) {
+ if (cmd) {
#ifdef SIGSEGV
#ifdef SIGSEGV
- if (fr_set_signal(SIGSEGV, fr_fault) < 0) return -1;
+
if (fr_set_signal(SIGSEGV, fr_fault) < 0) return -1;
#endif
#ifdef SIGBUS
#endif
#ifdef SIGBUS
- if (fr_set_signal(SIGBUS, fr_fault) < 0) return -1;
+
if (fr_set_signal(SIGBUS, fr_fault) < 0) return -1;
#endif
#ifdef SIGABRT
#endif
#ifdef SIGABRT
- if (fr_set_signal(SIGABRT, fr_fault) < 0) return -1;
- /*
- * Use this instead of abort so we get a
- * full backtrace with broken versions of LLDB
- */
- talloc_set_abort_fn(_fr_talloc_fault);
+
if (fr_set_signal(SIGABRT, fr_fault) < 0) return -1;
+
/*
+
* Use this instead of abort so we get a
+
* full backtrace with broken versions of LLDB
+
*/
+
talloc_set_abort_fn(_fr_talloc_fault);
#endif
#ifdef SIGFPE
#endif
#ifdef SIGFPE
- if (fr_set_signal(SIGFPE, fr_fault) < 0) return -1;
+
if (fr_set_signal(SIGFPE, fr_fault) < 0) return -1;
#endif
#endif
-
+ }
#ifdef SIGUSR1
if (fr_set_signal(SIGUSR1, fr_fault) < 0) return -1;
#endif
#ifdef SIGUSR1
if (fr_set_signal(SIGUSR1, fr_fault) < 0) return -1;
#endif