daandemeyer / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
1ff636
From 4581f8d1cde9b6fac4320e5cdf5234c96bbd60ae Mon Sep 17 00:00:00 2001
1ff636
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
1ff636
Date: Tue, 24 Feb 2015 10:10:04 -0500
1ff636
Subject: [PATCH] systemctl: bump NOFILE only for systemctl_main
1ff636
1ff636
It is not necessary when running as telinit, etc.
1ff636
1ff636
https://bugzilla.redhat.com/show_bug.cgi?id=1184712
1ff636
(cherry picked from commit 95d383ee47db488f182048cfd6846f2e6b859f2b)
1ff636
---
1ff636
 src/systemctl/systemctl.c | 10 +++++-----
1ff636
 1 file changed, 5 insertions(+), 5 deletions(-)
1ff636
1ff636
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
c62b8e
index 21cb898b9a..6b93ec8446 100644
1ff636
--- a/src/systemctl/systemctl.c
1ff636
+++ b/src/systemctl/systemctl.c
1ff636
@@ -7204,6 +7204,11 @@ found:
1ff636
                 }
1ff636
         }
1ff636
 
1ff636
+        /* Increase max number of open files to 16K if we can, we
1ff636
+         * might needs this when browsing journal files, which might
1ff636
+         * be split up into many files. */
1ff636
+        setrlimit_closest(RLIMIT_NOFILE, &RLIMIT_MAKE_CONST(16384));
1ff636
+
1ff636
         return verb->dispatch(bus, argv + optind);
1ff636
 }
1ff636
 
1ff636
@@ -7453,11 +7458,6 @@ int main(int argc, char*argv[]) {
1ff636
                 goto finish;
1ff636
         }
1ff636
 
1ff636
-        /* Increase max number of open files to 16K if we can, we
1ff636
-         * might needs this when browsing journal files, which might
1ff636
-         * be split up into many files. */
1ff636
-        setrlimit_closest(RLIMIT_NOFILE, &RLIMIT_MAKE_CONST(16384));
1ff636
-
1ff636
         if (!avoid_bus())
1ff636
                 r = bus_open_transport_systemd(arg_transport, arg_host, arg_scope != UNIT_FILE_SYSTEM, &bus;;
1ff636