dovecot: Removed restrict_raise_fd_limit().
dovecot at dovecot.org
dovecot at dovecot.org
Sat Sep 15 17:02:38 EEST 2007
details: http://hg.dovecot.org/dovecot/rev/1622e332c8ae
changeset: 6395:1622e332c8ae
user: Timo Sirainen <tss at iki.fi>
date: Sat Sep 15 16:57:11 2007 +0300
description:
Removed restrict_raise_fd_limit().
diffstat:
2 files changed, 26 deletions(-)
src/lib/restrict-process-size.c | 23 -----------------------
src/lib/restrict-process-size.h | 3 ---
diffs (42 lines):
diff -r 9e74c008484a -r 1622e332c8ae src/lib/restrict-process-size.c
--- a/src/lib/restrict-process-size.c Sat Sep 15 15:58:27 2007 +0300
+++ b/src/lib/restrict-process-size.c Sat Sep 15 16:57:11 2007 +0300
@@ -53,26 +53,3 @@ void restrict_fd_limit(unsigned int coun
i_fatal("setrlimit(RLIMIT_NOFILE, %u): %m", count);
#endif
}
-
-bool restrict_raise_fd_limit(unsigned int count)
-{
-#ifdef HAVE_SETRLIMIT
- struct rlimit rlim, new_rlim;
-
- if (getrlimit(RLIMIT_NOFILE, &rlim) < 0)
- return FALSE;
- if (rlim.rlim_cur >= count)
- return TRUE;
-
- new_rlim.rlim_cur = new_rlim.rlim_max = count;
- if (setrlimit(RLIMIT_NOFILE, &new_rlim) == 0)
- return TRUE;
-
- /* raise as high as we can */
- if (rlim.rlim_cur < rlim.rlim_max) {
- rlim.rlim_cur = rlim.rlim_max;
- (void)setrlimit(RLIMIT_NOFILE, &rlim);
- }
-#endif
- return FALSE;
-}
diff -r 9e74c008484a -r 1622e332c8ae src/lib/restrict-process-size.h
--- a/src/lib/restrict-process-size.h Sat Sep 15 15:58:27 2007 +0300
+++ b/src/lib/restrict-process-size.h Sat Sep 15 16:57:11 2007 +0300
@@ -6,8 +6,5 @@ void restrict_process_size(unsigned int
void restrict_process_size(unsigned int size, unsigned int max_processes);
/* Set fd limit to count. */
void restrict_fd_limit(unsigned int count);
-/* If fd limit is less than count, try to raise it. Probably fails (silently)
- if we're not running as root. Returns TRUE if succeeded. */
-bool restrict_raise_fd_limit(unsigned int count);
#endif
More information about the dovecot-cvs
mailing list