Revert "Guess terminal background even if stdout is not a tty"

This reverts commit 887cd83ebe.
This commit is contained in:
Dianne Skoll
2023-10-04 09:36:25 -04:00
parent 887cd83ebe
commit b2c7bc3d4e

View File

@@ -1008,6 +1008,11 @@ 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;