diff options
author | ribosome ribosome@31f1291d-b8d6-0310-a050-a5561fc1590b <ribosome ribosome@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2004-04-17 12:15:32 +0000 |
---|---|---|
committer | ribosome ribosome@31f1291d-b8d6-0310-a050-a5561fc1590b <ribosome ribosome@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2004-04-17 12:15:32 +0000 |
commit | a32595594ddd1ea9ed4eaffc4947995602b13860 (patch) | |
tree | 35588455237765f80ca00fce3013a4cc03a4549c | |
parent | 632a8f669c302a6920445c76325eee6ada08613b (diff) |
BUILD : 1.7.1 (57) BUGS : NOTES : Added SIGUSR2 to rehash configuration and save databases
git-svn-id: svn://svn.anope.org/anope/trunk@57 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@38 5417fbe8-f217-4b02-8779-1006273d7864
-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. # |