Module: kamailio Branch: master Commit: 31f0612c2d1f843e3cdc43aefebf3b942300149b URL: https://github.com/kamailio/kamailio/commit/31f0612c2d1f843e3cdc43aefebf3b94...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2020-12-02T14:25:46+01:00
core: main - log message on more signal values, wrap around SIG_DEBUG
- includes part of GH #2127
---
Modified: src/main.c
---
Diff: https://github.com/kamailio/kamailio/commit/31f0612c2d1f843e3cdc43aefebf3b94... Patch: https://github.com/kamailio/kamailio/commit/31f0612c2d1f843e3cdc43aefebf3b94...
---
diff --git a/src/main.c b/src/main.c index 373236c5d0..db81d3a0c3 100644 --- a/src/main.c +++ b/src/main.c @@ -833,9 +833,10 @@ void handle_sigs(void) */ void sig_usr(int signo) { - +#ifdef SIG_DEBUG #ifdef PKG_MALLOC int memlog; +#endif #endif
if (is_main){ @@ -859,7 +860,7 @@ void sig_usr(int signo) #ifdef SIG_DEBUG /* signal unsafe stuff follows */ LM_INFO("signal %d received\n", signo); /* print memory stats for non-main too */ - #ifdef PKG_MALLOC +#ifdef PKG_MALLOC /* make sure we have current cfg values, but update only the safe part (values not requiring callbacks), to account for processes that might not have registered @@ -877,11 +878,13 @@ void sig_usr(int signo) pkg_sums(); } } - #endif +#endif #endif _exit(0); break; case SIGUSR1: +#ifdef SIG_DEBUG /* signal unsafe stuff follows */ + LM_INFO("signal %d received\n", signo); #ifdef PKG_MALLOC cfg_update_no_cbs(); memlog=cfg_get(core, core_cfg, memlog); @@ -895,11 +898,15 @@ void sig_usr(int signo) pkg_sums(); } } +#endif #endif break; /* ignored*/ case SIGUSR2: case SIGHUP: +#ifdef SIG_DEBUG /* signal unsafe stuff follows */ + LM_INFO("signal %d received - ignoring\n", signo); +#endif break; case SIGCHLD: #ifndef STOP_JIRIS_CHANGES