Rehash on SIGHUP

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@951 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2008-02-10 16:45:18 +00:00
parent 8e33a7370f
commit e326f6eb35
3 changed files with 34 additions and 0 deletions
+7
View File
@@ -54,6 +54,10 @@ static void die(int sig) {
exit(sig);
}
static void rehash(int sig) {
CZNC::Get().SetNeedRehash(true);
}
int main(int argc, char** argv) {
CString sConfig;
CString sDataDir = "";
@@ -241,6 +245,9 @@ int main(int argc, char** argv) {
sigaction(SIGSEGV, &sa, (struct sigaction*) NULL);
sigaction(SIGTERM, &sa, (struct sigaction*) NULL);
sa.sa_handler = rehash;
sigaction(SIGHUP, &sa, (struct sigaction*) NULL);
int iRet = 0;
try {