diff options
| author | rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2005-11-08 20:47:50 +0000 |
|---|---|---|
| committer | rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2005-11-08 20:47:50 +0000 |
| commit | fbf820b4e6e597502b71f6ada16e4e9b667d1030 (patch) | |
| tree | b8902a1b17d0281a3ef1446deb9afe9073474b0b /src/main.c | |
| parent | 2cfdc0869594a6e4f69b103cd321e52f24ad98ab (diff) | |
Remove tmp modules from the runtime folder when we can. Currently we cant remove them if we segfaulted, pretty much every other instance is now dealt with.
git-svn-id: svn://svn.anope.org/anope/trunk@936 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@670 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c index 23167e0e9..e274e2504 100644 --- a/src/main.c +++ b/src/main.c @@ -223,6 +223,7 @@ static void services_restart(void) #if defined(LINUX20) || defined(LINUX22) pthread_kill_other_threads_np(); #endif + modules_unload_all(true); execve(SERVICES_BIN, my_av, my_envp); if (!readonly) { open_log(); @@ -275,7 +276,7 @@ static void services_shutdown(void) } send_event(EVENT_SHUTDOWN, 1, EVENT_STOP); disconn(servsock); - modules_unload_all(); /* Only legitimate use of this function */ + modules_unload_all(true); /* Only legitimate use of this function */ } /*************************************************************************/ @@ -355,6 +356,7 @@ void sighandler(int signum) inbuf[448] = 0; } wallops(NULL, "PANIC! buffer = %s\r\n", inbuf); + modules_unload_all(false); } else if (waiting < 0) { /* This is static on the off-chance we run low on stack */ static char buf[BUFSIZE]; @@ -412,6 +414,7 @@ void sighandler(int signum) } wallops(NULL, "PANIC! %s (%s)", buf, strsignal(signum)); alog("PANIC! %s (%s)", buf, strsignal(signum)); + modules_unload_all(false); } } @@ -433,6 +436,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 */ } /* Should we send the signum here as well? -GD */ send_event(EVENT_SIGNAL, 1, quitmsg); |
