core: don't reset /dev/console if stdin/stdout/stderr as passed as fd in a transient service
Otherwise we might end resetting /dev/console all the time when a transient service starts or stops. Fixes #2377 Fixes #2198 Fixes #2061
This commit is contained in:
@@ -726,9 +726,7 @@ bool tty_is_vc_resolve(const char *tty) {
|
||||
}
|
||||
|
||||
const char *default_term_for_tty(const char *tty) {
|
||||
assert(tty);
|
||||
|
||||
return tty_is_vc_resolve(tty) ? "TERM=linux" : "TERM=vt220";
|
||||
return tty && tty_is_vc_resolve(tty) ? "TERM=linux" : "TERM=vt220";
|
||||
}
|
||||
|
||||
int fd_columns(int fd) {
|
||||
|
||||
Reference in New Issue
Block a user