various: clean up isatty() handling

As per https://github.com/systemd/systemd/pull/30547#discussion_r1434371627
This commit is contained in:
Mike Yuan
2023-12-22 23:06:49 +08:00
parent 76270f5c09
commit dd9c8da865
12 changed files with 26 additions and 29 deletions
+1 -1
View File
@@ -414,7 +414,7 @@ static bool check_console_fd_is_tty(void) {
return false;
if (console_fd_is_tty < 0)
console_fd_is_tty = isatty(console_fd) > 0;
console_fd_is_tty = isatty_safe(console_fd);
return console_fd_is_tty;
}