summaryrefslogtreecommitdiff
path: root/src/login
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-10-01 17:44:46 +0200
committerLennart Poettering <lennart@poettering.net>2018-10-16 16:33:55 +0200
commit1abaf4887dde91bd19b36a80475a8eb03f363590 (patch)
treeb079972de26115cb375cda6c017851f9cf6c321a /src/login
parent99ab6fdf8c68bbe05a127b59ae03d2156d6ea856 (diff)
downloadsystemd-1abaf4887dde91bd19b36a80475a8eb03f363590.tar.gz
systemd-1abaf4887dde91bd19b36a80475a8eb03f363590.tar.bz2
systemd-1abaf4887dde91bd19b36a80475a8eb03f363590.zip
tree-wide: uniformly bump RLIMIT_NOFILE in all our tools that access the journal
This makes use of rlimit_nofile_bump() in all tools that access the journal. In some cases this replaces older code to achieve this, and others we add it in where it was missing.
Diffstat (limited to 'src/login')
-rw-r--r--src/login/loginctl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/login/loginctl.c b/src/login/loginctl.c
index c9c3166f0c..39c24f8c3a 100644
--- a/src/login/loginctl.c
+++ b/src/login/loginctl.c
@@ -21,6 +21,7 @@
#include "pager.h"
#include "parse-util.h"
#include "process-util.h"
+#include "rlimit-util.h"
#include "sigbus.h"
#include "signal-util.h"
#include "spawn-polkit-agent.h"
@@ -1522,6 +1523,10 @@ int main(int argc, char *argv[]) {
setlocale(LC_ALL, "");
log_parse_environment();
log_open();
+
+ /* The journal merging logic potentially needs a lot of fds. */
+ (void) rlimit_nofile_bump(HIGH_RLIMIT_NOFILE);
+
sigbus_install();
r = parse_argv(argc, argv);