... | ... |
@@ -681,9 +681,9 @@ data_target = $(prefix)/$(data_dir) |
681 | 681 |
# -DPROFILING |
682 | 682 |
# if enabled profiling will be enabled for child processes |
683 | 683 |
# Don't forget to set PROFILE (see below) |
684 |
-# -DNO_SIG_DEBUG |
|
685 |
-# turns off debugging messages in signal handlers (which might be |
|
686 |
-# unsafe) |
|
684 |
+# -DUSE_UNSAFE_SIG_DEBUG |
|
685 |
+# turns on debugging messages in signal handlers (which are |
|
686 |
+# unsafe, but might be acceptable for occasional debugging) |
|
687 | 687 |
# -DUSE_NAPTR |
688 | 688 |
# turns on naptr support (but must be also enabled from the config) |
689 | 689 |
# -DDNS_WATCHDOG_SUPPORT |
... | ... |
@@ -741,7 +741,7 @@ C_DEFS+= -DSHM_MMAP \ |
741 | 741 |
#-DNOSMP \ |
742 | 742 |
#-DNO_LOG \ |
743 | 743 |
#-DPROFILING \ |
744 |
- #-DNO_SIG_DEBUG |
|
744 |
+ #-DUSE_UNSAFE_SIG_DEBUG |
|
745 | 745 |
|
746 | 746 |
#PROFILE= -pg # set this if you want profiling |
747 | 747 |
# you may also want to set -DPROFILING |
... | ... |
@@ -173,7 +173,7 @@ void set_module_debug_facility_cb(get_module_debug_facility_f f); |
173 | 173 |
extern struct log_level_info log_level_info[]; |
174 | 174 |
extern char *log_name; |
175 | 175 |
|
176 |
-#ifndef NO_SIG_DEBUG |
|
176 |
+#ifndef USE_UNSAFE_SIG_DEBUG |
|
177 | 177 |
/** @brief protection against "simultaneous" printing from signal handlers */ |
178 | 178 |
extern volatile int dprint_crit; |
179 | 179 |
#endif |
... | ... |
@@ -228,7 +228,7 @@ void log_prefix_init(void); |
228 | 228 |
|
229 | 229 |
#else |
230 | 230 |
|
231 |
-# ifdef NO_SIG_DEBUG |
|
231 |
+# ifdef USE_UNSAFE_SIG_DEBUG |
|
232 | 232 |
# define DPRINT_NON_CRIT (1) |
233 | 233 |
# define DPRINT_CRIT_ENTER |
234 | 234 |
# define DPRINT_CRIT_EXIT |
... | ... |
@@ -276,10 +276,10 @@ |
276 | 276 |
#define USE_DST_BLOCKLIST_STR "" |
277 | 277 |
#endif |
278 | 278 |
|
279 |
-#ifdef NO_SIG_DEBUG |
|
280 |
-#define NO_SIG_DEBUG_STR ", NO_SIG_DEBUG" |
|
279 |
+#ifdef USE_UNSAFE_SIG_DEBUG |
|
280 |
+#define USE_UNSAFE_SIG_DEBUG_STR ", USE_UNSAFE_SIG_DEBUG" |
|
281 | 281 |
#else |
282 |
-#define NO_SIG_DEBUG_STR "" |
|
282 |
+#define USE_UNSAFE_SIG_DEBUG_STR "" |
|
283 | 283 |
#endif |
284 | 284 |
|
285 | 285 |
#ifdef HAVE_RESOLV_RES |
... | ... |
@@ -328,7 +328,7 @@ |
328 | 328 |
EXTRA_DEBUG_STR USE_TCP_STR USE_TLS_STR \ |
329 | 329 |
USE_SCTP_STR CORE_TLS_STR TLS_HOOKS_STR USE_RAW_SOCKS_STR \ |
330 | 330 |
DISABLE_NAGLE_STR USE_MCAST_STR NO_DEBUG_STR NO_LOG_STR \ |
331 |
- NO_SIG_DEBUG_STR DNS_IP_HACK_STR \ |
|
331 |
+ USE_UNSAFE_SIG_DEBUG_STR DNS_IP_HACK_STR \ |
|
332 | 332 |
SHM_MMAP_STR PKG_MALLOC_STR \ |
333 | 333 |
Q_MALLOC_STR F_MALLOC_STR DL_MALLOC_STR SF_MALLOC_STR LL_MALLOC_STR TLSF_MALLOC_STR \ |
334 | 334 |
DBG_SR_MEMORY_STR DBG_QM_MALLOC_STR DBG_F_MALLOC_STR \ |
... | ... |
@@ -148,11 +148,11 @@ |
148 | 148 |
#endif |
149 | 149 |
#include "core/ver.h" |
150 | 150 |
|
151 |
-/* define SIG_DEBUG by default */ |
|
152 |
-#ifdef NO_SIG_DEBUG |
|
153 |
-#undef SIG_DEBUG |
|
154 |
-#else |
|
151 |
+/* Do not define SIG_DEBUG by default */ |
|
152 |
+#ifdef USE_UNSAFE_SIG_DEBUG |
|
155 | 153 |
#define SIG_DEBUG |
154 |
+#else |
|
155 |
+#undef SIG_DEBUG |
|
156 | 156 |
#endif |
157 | 157 |
|
158 | 158 |
|
... | ... |
@@ -834,8 +834,10 @@ void handle_sigs(void) |
834 | 834 |
void sig_usr(int signo) |
835 | 835 |
{ |
836 | 836 |
|
837 |
+#ifdef SIG_DEBUG /* signal unsafe stuff follows */ |
|
837 | 838 |
#ifdef PKG_MALLOC |
838 | 839 |
int memlog; |
840 |
+#endif |
|
839 | 841 |
#endif |
840 | 842 |
|
841 | 843 |
if (is_main){ |
... | ... |
@@ -882,6 +884,7 @@ void sig_usr(int signo) |
882 | 884 |
_exit(0); |
883 | 885 |
break; |
884 | 886 |
case SIGUSR1: |
887 |
+#ifdef SIG_DEBUG /* signal unsafe stuff follows */ |
|
885 | 888 |
#ifdef PKG_MALLOC |
886 | 889 |
cfg_update_no_cbs(); |
887 | 890 |
memlog=cfg_get(core, core_cfg, memlog); |
... | ... |
@@ -895,6 +898,7 @@ void sig_usr(int signo) |
895 | 898 |
pkg_sums(); |
896 | 899 |
} |
897 | 900 |
} |
901 |
+#endif |
|
898 | 902 |
#endif |
899 | 903 |
break; |
900 | 904 |
/* ignored*/ |