diff options
| -rw-r--r-- | Changes | 1 | ||||
| -rw-r--r-- | init.c | 3 | ||||
| -rw-r--r-- | main.c | 16 | ||||
| -rw-r--r-- | version.log | 6 |
4 files changed, 24 insertions, 2 deletions
@@ -1,6 +1,7 @@ Anope Version SVN -------------------- Provided by Anope Dev. <dev@anope.org> +2004/04/17 Added SIGUSR2 signal to Rehash Config and Save DBs 2004/04/16 Fixed broken password saves to MySQL (Bug #11) Anope Version 1.7.1 @@ -605,7 +605,7 @@ int init(int ac, char **av) for (i = 1; i <= 31; i++) { #endif #if defined(USE_THREADS) && defined(LINUX20) - if (i != SIGUSR1 && i != SIGUSR2) + if (i != SIGUSR1) #endif signal(i, SIG_IGN); } @@ -630,6 +630,7 @@ int init(int ac, char **av) } signal(SIGQUIT, sighandler); signal(SIGHUP, sighandler); + signal(SIGUSR2, sighandler); #ifdef SIGIOT signal(SIGIOT, sighandler); @@ -249,6 +249,7 @@ void sighandler(int signum) if (started) { if (signum == SIGHUP) { /* SIGHUP = save databases and restart */ signal(SIGHUP, SIG_IGN); + signal(SIGUSR2, SIG_IGN); alog("Received SIGHUP, restarting."); expire_all(); @@ -264,6 +265,21 @@ void sighandler(int signum) quitmsg = "Restart attempt failed--SERVICES_BIN not defined (rerun configure)"; #endif + + } else if (signum == SIGUSR2) { + + alog("Received SIGUSR2: Saving Databases & Rehash Configuration"); + + expire_all(); + save_databases(); + + if (!read_config(1)) { + sprintf(quitmsg, + "Error Reading Configuration File (Received SIGUSR2)"); + quitting = 1; + } + return; + } else if (signum == SIGTERM) { signal(SIGTERM, SIG_IGN); signal(SIGHUP, SIG_IGN); diff --git a/version.log b/version.log index c362f1ae1..3411f45b9 100644 --- a/version.log +++ b/version.log @@ -8,11 +8,15 @@ VERSION_MAJOR="1" VERSION_MINOR="7" VERSION_PATCH="1" -VERSION_BUILD="56" +VERSION_BUILD="57" VERSION_EXTRA="" # $Log$ # +# BUILD : 1.7.1 (57) +# BUGS : +# NOTES : Added SIGUSR2 to rehash configuration and save databases +# # BUILD : 1.7.1 (56) # NOTES : Fourth time is a charm? Fixinf MySQL password saves. # |
