Forward port the removal of -nolimit (doesn't seem to be in the current command line stuff regardless?)

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3815 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
w00t 2006-04-04 05:42:33 +00:00
parent 1948b0ac28
commit 0fb892afc9
2 changed files with 11 additions and 22 deletions

View File

@ -189,14 +189,6 @@ class ServerConfig : public classbase
*/ */
bool nofork; bool nofork;
/** If this value is true, the owner of the
* server has chosen to unlimit the coredump
* size to as large a value as his account
* settings will allow. This is often used
* when debugging.
*/
bool unlimitcore;
/** If this value is true, halfops have been /** If this value is true, halfops have been
* enabled in the configuration file. * enabled in the configuration file.
*/ */

View File

@ -52,7 +52,7 @@ ServerConfig::ServerConfig()
*CustomVersion = *motd = *rules = *PrefixQuit = *DieValue = *DNSServer = '\0'; *CustomVersion = *motd = *rules = *PrefixQuit = *DieValue = *DNSServer = '\0';
*OperOnlyStats = *ModPath = *MyExecutable = *DisabledCommands = *PID = '\0'; *OperOnlyStats = *ModPath = *MyExecutable = *DisabledCommands = *PID = '\0';
log_file = NULL; log_file = NULL;
OperSpyWhois = nofork = HideBans = HideSplits = unlimitcore = false; OperSpyWhois = nofork = HideBans = HideSplits = false;
AllowHalfop = true; AllowHalfop = true;
dns_timeout = DieDelay = 5; dns_timeout = DieDelay = 5;
MaxTargets = 20; MaxTargets = 20;
@ -901,20 +901,17 @@ bool DaemonSeed()
umask (007); umask (007);
printf("InspIRCd Process ID: \033[1;32m%lu\033[0m\n",(unsigned long)getpid()); printf("InspIRCd Process ID: \033[1;32m%lu\033[0m\n",(unsigned long)getpid());
if (Config->unlimitcore) rlimit rl;
if (getrlimit(RLIMIT_CORE, &rl) == -1)
{ {
rlimit rl; log(DEFAULT,"Failed to getrlimit()!");
if (getrlimit(RLIMIT_CORE, &rl) == -1) return false;
{ }
log(DEFAULT,"Failed to getrlimit()!"); else
return false; {
} rl.rlim_cur = rl.rlim_max;
else if (setrlimit(RLIMIT_CORE, &rl) == -1)
{ log(DEFAULT,"setrlimit() failed, cannot increase coredump size.");
rl.rlim_cur = rl.rlim_max;
if (setrlimit(RLIMIT_CORE, &rl) == -1)
log(DEFAULT,"setrlimit() failed, cannot increase coredump size.");
}
} }
return true; return true;