diff options
author | geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2005-12-11 09:48:57 +0000 |
---|---|---|
committer | geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2005-12-11 09:48:57 +0000 |
commit | 86ccb584ddec7990bcd831476e83ac58da0ef9c2 (patch) | |
tree | eea2d260e8e12dd7de55321f93ffce5e7dd45ec2 /src/main.c | |
parent | da183c9107b5fccf20ef91232f44fc453b2b673a (diff) |
BUILD : 1.7.12 (945) BUGS : 405 410 NOTES : Fixed: first user on HelpChannel always got +h, even if it had no access at all; enforcers had incorrect user when only user was specified; missing quitmessage when catching unknown signals
git-svn-id: svn://svn.anope.org/anope/trunk@945 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@674 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c index e274e2504..beb488d23 100644 --- a/src/main.c +++ b/src/main.c @@ -276,7 +276,7 @@ static void services_shutdown(void) } send_event(EVENT_SHUTDOWN, 1, EVENT_STOP); disconn(servsock); - modules_unload_all(true); /* Only legitimate use of this function */ + modules_unload_all(true); /* Only legitimate use of this function */ } /*************************************************************************/ @@ -285,6 +285,11 @@ static void services_shutdown(void) void sighandler(int signum) { + /* We set the quit message to something default, just to be sure it is + * always set when we need it. It seems some signals slip through to the + * QUIT code without having a valid quitmsg. -GD + */ + quitmsg = sstrdup("Signal Received"); if (started) { #ifndef _WIN32 if (signum == SIGHUP) { /* SIGHUP = save databases and restart */ @@ -356,7 +361,7 @@ void sighandler(int signum) inbuf[448] = 0; } wallops(NULL, "PANIC! buffer = %s\r\n", inbuf); - modules_unload_all(false); + modules_unload_all(false); } else if (waiting < 0) { /* This is static on the off-chance we run low on stack */ static char buf[BUFSIZE]; @@ -414,7 +419,7 @@ void sighandler(int signum) } wallops(NULL, "PANIC! %s (%s)", buf, strsignal(signum)); alog("PANIC! %s (%s)", buf, strsignal(signum)); - modules_unload_all(false); + modules_unload_all(false); } } @@ -436,7 +441,7 @@ void sighandler(int signum) if (signum == SIGSEGV) { do_backtrace(1); - modules_unload_all(false); /* probably cant do this, but might as well try, we have nothing left to loose */ + modules_unload_all(false); /* probably cant do this, but might as well try, we have nothing left to loose */ } /* Should we send the signum here as well? -GD */ send_event(EVENT_SIGNAL, 1, quitmsg); |