FOREACH_MOD(I_OnRehash,OnRehash(""));
}
-void InspIRCd::SetSignals()
+void InspIRCd::SetSignals(bool SEGVHandler)
{
signal (SIGALRM, SIG_IGN);
signal (SIGHUP, Rehash);
signal (SIGPIPE, SIG_IGN);
signal (SIGTERM, Exit);
- signal (SIGSEGV, Error);
+ if (SEGVHandler)
+ signal (SIGSEGV, Error);
}
bool InspIRCd::DaemonSeed()
InspIRCd::InspIRCd(int argc, char** argv)
{
+ bool SEGVHandler = false;
+
this->Start();
module_sockets.clear();
this->startup_time = time(NULL);
{
printf("WARNING: The `-nolimit' option is deprecated, and now on by default. This behaviour may change in the future.\n");
}
+ else if (!strcmp(argv[i],"-notraceback"))
+ {
+ SEGVHandler = false;
+ }
else if (!strcmp(argv[i],"-logfile"))
{
if (argc > i+1)
printf("ERROR: The -logfile parameter must be followed by a log file name and path.\n");
Exit(ERROR);
}
+ i++;
+ }
+ else
+ {
+ printf("Usage: %s [-nofork] [-nolog] [-debug] [-wait] [-nolimit] [-notraceback] [-logfile <filename>]\n",argv[0]);
+ Exit(ERROR);
}
}
}
this->stats = new serverstats();
this->Parser = new CommandParser();
Config->ClearStack();
- Config->Read(true,NULL);
+ Config->Read(true, NULL);
CheckRoot();
this->ModeGrok = new ModeParser();
AddServerName(Config->ServerName);
memset(&Config->implement_lists,0,sizeof(Config->implement_lists));
printf("\n");
- this->SetSignals();
+ this->SetSignals(SEGVHandler);
if (!Config->nofork)
{
if (!this->DaemonSeed())
}
// found the module
+ log(DEBUG,"Removing dependent commands...");
+ Parser->RemoveCommands(filename);
log(DEBUG,"Deleting module...");
this->EraseModule(j);
log(DEBUG,"Erasing module entry...");
this->EraseFactory(j);
- log(DEBUG,"Removing dependent commands...");
- Parser->RemoveCommands(filename);
log(DEFAULT,"Module %s unloaded",filename);
MODCOUNT--;
BuildISupport();