1
0
mirror of https://github.com/anope/anope.git synced 2026-06-12 18:54:47 +02:00

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
This commit is contained in:
ribosome ribosome@31f1291d-b8d6-0310-a050-a5561fc1590b
2004-04-17 12:15:32 +00:00
parent 632a8f669c
commit a32595594d
4 changed files with 24 additions and 2 deletions
+1
View File
@@ -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
+2 -1
View File
@@ -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);
+16
View File
@@ -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);
+5 -1
View File
@@ -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.
#