summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-11 12:18:03 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-11 12:18:03 +0000
commit5c328da92fbf7a7e8b26ded2df085d3cf49f67f5 (patch)
treeea2e58b4852df608d9958394e23309a7495ebd3c /src
parentb193391141af466ec36bb5b1a30650eb67cccb0f (diff)
Added getrlimit/setrlimit to set process limits to allow a core dump
Removed some logging from wildcard.cpp git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1040 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/inspircd_io.cpp13
-rw-r--r--src/wildcard.cpp2
2 files changed, 13 insertions, 2 deletions
diff --git a/src/inspircd_io.cpp b/src/inspircd_io.cpp
index c9475dcd7..fca22e3be 100644
--- a/src/inspircd_io.cpp
+++ b/src/inspircd_io.cpp
@@ -125,6 +125,19 @@ int DaemonSeed (void)
freopen("/dev/null","w",stderr);
setpriority(PRIO_PROCESS,(int)getpid(),15); /* ircd sets to low process priority so it doesnt hog the box */
+
+ rlimit rl;
+ if (getrlimit(RLIMIT_CORE, &rl) == -1)
+ {
+ log(DEFAULT,"Failed to getrlimit()!");
+ return(FALSE);
+ }
+ else
+ {
+ rl.rlim_cur = rl.rlim_max;
+ if (setrlimit(RLIMIT_CORE, &rl) == -1)
+ log(DEFAULT,"setrlimit() failed, cannot increase coredump size.");
+ }
return (TRUE);
}
diff --git a/src/wildcard.cpp b/src/wildcard.cpp
index 47fbaf002..123abc500 100644
--- a/src/wildcard.cpp
+++ b/src/wildcard.cpp
@@ -105,10 +105,8 @@ bool match(const char* literal, const char* mask)
log(DEBUG,"Match '%s' to '%s'",L,M);
if ((!strchr(M,'*')) && (!strchr(M,'?')))
{
- log(DEBUG,"Short circuiting literal");
if (!strcasecmp(L,M))
{
- log(DEBUG,"Literal match");
return true;
}
}