From 1abaf4887dde91bd19b36a80475a8eb03f363590 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 1 Oct 2018 17:44:46 +0200 Subject: 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. --- src/login/loginctl.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/login') 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); -- cgit v1.2.3