shared/logs-show: introduce journal_browse_prepare()
which combines sigbus_install() and bumping fd limit.
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include "capsule-util.h"
|
||||
#include "dissect-image.h"
|
||||
#include "install.h"
|
||||
#include "logs-show.h"
|
||||
#include "main-func.h"
|
||||
#include "mount-util.h"
|
||||
#include "output-mode.h"
|
||||
@@ -21,7 +22,6 @@
|
||||
#include "process-util.h"
|
||||
#include "reboot-util.h"
|
||||
#include "rlimit-util.h"
|
||||
#include "sigbus.h"
|
||||
#include "signal-util.h"
|
||||
#include "stat-util.h"
|
||||
#include "string-table.h"
|
||||
@@ -1263,15 +1263,12 @@ static int run(int argc, char *argv[]) {
|
||||
setlocale(LC_ALL, "");
|
||||
log_setup();
|
||||
|
||||
/* The journal merging logic potentially needs a lot of fds. */
|
||||
(void) rlimit_nofile_bump(HIGH_RLIMIT_NOFILE);
|
||||
|
||||
sigbus_install();
|
||||
|
||||
r = systemctl_dispatch_parse_argv(argc, argv);
|
||||
if (r <= 0)
|
||||
goto finish;
|
||||
|
||||
journal_browse_prepare();
|
||||
|
||||
if (proc_mounted() == 0)
|
||||
log_full(arg_no_warn ? LOG_DEBUG : LOG_WARNING,
|
||||
"%s%s/proc/ is not mounted. This is not a supported mode of operation. Please fix\n"
|
||||
|
||||
Reference in New Issue
Block a user