From 99d88e0170feac699d4738362afdaaba88015629 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 26 Jan 2006 23:04:42 +0000 Subject: [PATCH] Altered so that if running in -debug mode, will not erase its .so files from /tmp to allow a clean backtrace git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2928 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/dynamic.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/dynamic.cpp b/src/dynamic.cpp index e96c9d905..06aaf3ccd 100644 --- a/src/dynamic.cpp +++ b/src/dynamic.cpp @@ -17,6 +17,7 @@ using namespace std; #include "inspircd_config.h" +#include "inspircd_io.h" #include "globals.h" #include "dynamic.h" @@ -32,6 +33,8 @@ using namespace std; #include #include +extern ServerConfig* Config; + DLLManager::DLLManager(char *fname) { #ifdef STATIC_LINK @@ -72,7 +75,8 @@ DLLManager::DLLManager(char *fname) err = (char*)dlerror(); close(fd); // We can delete the tempfile once it's loaded, leaving just the inode. - unlink(tmpfile_template); + if (!Config->debugging) + unlink(tmpfile_template); #endif } -- 2.39.5