Guess terminal background even if stdout is not a tty

This commit is contained in:
Dianne Skoll
2023-10-04 09:33:54 -04:00
parent 242d787ca2
commit 887cd83ebe

View File

@@ -1008,11 +1008,6 @@ guess_terminal_background(int *r, int *g, int *b)
*g = -1;
*b = -1;
/* Don't guess if stdout not a terminal */
if (!isatty(STDOUT_FILENO)) {
return;
}
ttyfd = open("/dev/tty", O_RDWR);
if (ttyfd < 0) {
return;