From: Zbigniew Jędrzejewski-Szmek Date: Mon, 13 Apr 2026 12:20:43 +0000 (+0200) Subject: executor: move reopening of the console after option parsing X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F41618%2Fhead;p=thirdparty%2Fsystemd.git executor: move reopening of the console after option parsing It seems to be interfering with systemd:check-help-systemd-executor test in CI. In practice, any messages from parse_argv() are going to be from manual invocations, since if called from PID1 the option syntax is going to be correct. So I hope this fixes the redirection of --help but otherwise is of little consequence. --- diff --git a/src/core/executor.c b/src/core/executor.c index 8089d376fe8..94bb481db43 100644 --- a/src/core/executor.c +++ b/src/core/executor.c @@ -156,7 +156,6 @@ static int run(int argc, char *argv[]) { cgroup_context_init(&cgroup_context); /* We might be starting the journal itself, we'll be told by the caller what to do */ - log_set_always_reopen_console(true); log_set_prohibit_ipc(true); log_setup(); @@ -165,6 +164,7 @@ static int run(int argc, char *argv[]) { return r; /* Now that we know the intended log target, allow IPC and open the final log target. */ + log_set_always_reopen_console(true); log_set_prohibit_ipc(false); log_open();