commit de1de4055123e95fd9dc1b7e40c69a760777079d from: Alexander Barton date: Sun Nov 10 20:12:43 2019 UTC Log received signals (using strsignal(3), when available) commit - 4169cb25e620cbd8a54cd19b509a8f88d7c295f9 commit + de1de4055123e95fd9dc1b7e40c69a760777079d blob - 367c2f0cc59a9c386d11c2fab3f5239a30aba22f blob + a3855dbebee95b1bd33059ce16b16a87abb9a4a5 --- configure.ng +++ configure.ng @@ -265,6 +265,7 @@ AC_CHECK_FUNCS_ONCE([ strlcat \ strlcpy \ strndup \ + strsignal \ strtok_r \ unsetenv \ vsnprintf \ blob - 761a68e1e2a61ad64ad5e9ffc92dfd14b8d06f95 blob + 60bb630f03fb74de6c329ca09b08ee61bea4b9db --- contrib/MacOSX/config.h +++ contrib/MacOSX/config.h @@ -113,6 +113,8 @@ #define HAVE_SIGACTION 1 /* Define to 1 if you have the `setsid' function. */ #define HAVE_SETSID 1 +/* Define to 1 if you have the `strsignal' function. */ +#define HAVE_STRSIGNAL 1 /* Define if socklen_t exists */ #define HAVE_socklen_t 1 blob - 6244846fb4b020275137f3f2189041c16a036c0c blob + f7ae4f45708084f04a375f9482a2ad3913f36d97 --- src/ngircd/sighandlers.c +++ src/ngircd/sighandlers.c @@ -154,6 +154,14 @@ Rehash(void) static void Signal_Handler(int Signal) { + if (Signal != SIGCHLD) { +#ifdef HAVE_STRSIGNAL + Log(LOG_INFO, "Got signal \"%s\" ...", strsignal(Signal)); +#else + Log(LOG_INFO, "Got signal %d ...", Signal); +#endif + } + switch (Signal) { case SIGTERM: case SIGINT: