summaryrefslogtreecommitdiffstats
path: root/src/journal
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-10-17 17:59:36 +0200
committerGitHub <noreply@github.com>2018-10-17 17:59:36 +0200
commit8aeb1d3176bf90f42c469deb40c3cfdda913acf2 (patch)
treebc301fb62f480e868025375c28751185e41f0694 /src/journal
parentMerge pull request #10429 from yuwata/drop-udev-list (diff)
parentmeson: simplify definition of MEMORY_ACCOUNTING_DEFAULT (diff)
downloadsystemd-8aeb1d3176bf90f42c469deb40c3cfdda913acf2.tar.xz
systemd-8aeb1d3176bf90f42c469deb40c3cfdda913acf2.zip
Merge pull request #10244 from poettering/nofile-bump
bump RLIMIT_NOFILE
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/journalctl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index 4d186014ed..9bd2d9a150 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -31,6 +31,7 @@
#include "bus-util.h"
#include "catalog.h"
#include "chattr-util.h"
+#include "def.h"
#include "device-private.h"
#include "fd-util.h"
#include "fileio.h"
@@ -2049,6 +2050,10 @@ int main(int argc, char *argv[]) {
log_parse_environment();
log_open();
+ /* Increase max number of open files if we can, we might needs this when browsing journal files, which might be
+ * split up into many files. */
+ (void) rlimit_nofile_bump(HIGH_RLIMIT_NOFILE);
+
r = parse_argv(argc, argv);
if (r <= 0)
goto finish;
@@ -2056,11 +2061,6 @@ int main(int argc, char *argv[]) {
signal(SIGWINCH, columns_lines_cache_reset);
sigbus_install();
- /* Increase max number of open files to 16K if we can, we
- * might needs this when browsing journal files, which might
- * be split up into many files. */
- setrlimit_closest(RLIMIT_NOFILE, &RLIMIT_MAKE_CONST(16384));
-
switch (arg_action) {
case ACTION_NEW_ID128: