From de45d726034f33afdb0a185e62fc61bf10a0acd2 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 8 Jan 2015 03:17:50 +0100 Subject: journal: bump RLIMIT_NOFILE when journal files to 16K (if possible) When there are a lot of split out journal files, we might run out of fds quicker then we want. Hence: bump RLIMIT_NOFILE to 16K if possible. Do these even for journalctl. On Fedora the soft RLIMIT_NOFILE is at 1K, the hard at 4K by default for normal user processes, this code hence bumps this up for users to 4K. https://bugzilla.redhat.com/show_bug.cgi?id=1179980 --- src/shared/util.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/shared/util.h') diff --git a/src/shared/util.h b/src/shared/util.h index 31103e957f..3b3035a1c7 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -1074,3 +1074,5 @@ int same_fd(int a, int b); int chattr_fd(int fd, bool b, int mask); int chattr_path(const char *p, bool b, int mask); + +#define RLIMIT_MAKE_CONST(lim) ((struct rlimit) { lim, lim }) -- cgit v1.2.3-54-g00ecf