1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-10 01:17:44 +03:00

main: reopen /dev/console for user service manager

Now the console_fd of user service manager is 2. Even if LogTarget=console is set in /etc/systemd/user.conf,there is no log in the console.
This reopen the /dev/console, so the log of user service can be output in the console.
This commit is contained in:
Einsler Lee 2021-03-02 20:21:21 +08:00 committed by Lennart Poettering
parent d2efca1c12
commit 2a646b1d62

View File

@ -2819,6 +2819,7 @@ int main(int argc, char *argv[]) {
} else {
/* Running as user instance */
arg_system = false;
log_set_always_reopen_console(true);
log_set_target(LOG_TARGET_AUTO);
log_open();