summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/systemctl/systemctl.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 75d709d317..4e702fb8bc 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -4466,6 +4466,12 @@ static int show(sd_bus *bus, char **args) {
if (show_properties)
pager_open_if_enabled();
+ if (show_status)
+ /* 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));
+
/* If no argument is specified inspect the manager itself */
if (show_properties && strv_length(args) <= 1)
@@ -7164,11 +7170,6 @@ found:
}
}
- /* 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));
-
return verb->dispatch(bus, argv + optind);
}