pid1: disable color output when TERM=dumb
This changes the behaviour of pid1 in the following ways: - obviously $TERM is now checked, - $SYSTEMD_COLORS is now honoured too, before only SYSTEMD_LOG_COLORS was checked, - isatty() is run on stdout not stderr. As requested in #3025.
This commit is contained in:
+1
-1
@@ -1338,7 +1338,7 @@ int main(int argc, char *argv[]) {
|
||||
saved_argv = argv;
|
||||
saved_argc = argc;
|
||||
|
||||
log_show_color(isatty(STDERR_FILENO) > 0);
|
||||
log_show_color(colors_enabled());
|
||||
log_set_upgrade_syslog_to_journal(true);
|
||||
|
||||
/* Disable the umask logic */
|
||||
|
||||
Reference in New Issue
Block a user