Blame cyrus-imapd-2.1.16-getrlimit.patch
|
|
d0d307a |
--- cyrus-imapd-2.1.16/master/master.c.getrlimit 2003-12-28 17:32:46.000000000 +0100
|
|
|
d0d307a |
+++ cyrus-imapd-2.1.16/master/master.c 2003-12-28 17:43:56.000000000 +0100
|
|
|
d0d307a |
@@ -1208,12 +1208,10 @@
|
|
|
d0d307a |
rl.rlim_cur = x;
|
|
|
d0d307a |
rl.rlim_max = x;
|
|
|
d0d307a |
if (setrlimit(RLIMIT_NUMFDS, &rl) < 0) {
|
|
|
d0d307a |
- syslog(LOG_ERR, "setrlimit: Unable to set file descriptors limit to %ld: %m", x);
|
|
|
d0d307a |
|
|
|
d0d307a |
#ifdef HAVE_GETRLIMIT
|
|
|
d0d307a |
|
|
|
d0d307a |
if (!getrlimit(RLIMIT_NUMFDS, &rl)) {
|
|
|
d0d307a |
- syslog(LOG_ERR, "retrying with %ld (current max)", rl.rlim_max);
|
|
|
d0d307a |
rl.rlim_cur = rl.rlim_max;
|
|
|
d0d307a |
if (setrlimit(RLIMIT_NUMFDS, &rl) < 0) {
|
|
|
d0d307a |
syslog(LOG_ERR, "setrlimit: Unable to set file descriptors limit to %ld: %m", x);
|
|
|
d0d307a |
@@ -1228,6 +1226,7 @@
|
|
|
d0d307a |
rl.rlim_max);
|
|
|
d0d307a |
}
|
|
|
d0d307a |
#else
|
|
|
d0d307a |
+ syslog(LOG_ERR, "setrlimit: Unable to set file descriptors limit to %ld: %m", x);
|
|
|
d0d307a |
}
|
|
|
d0d307a |
#endif /* HAVE_GETRLIMIT */
|
|
|
d0d307a |
}
|