summaryrefslogtreecommitdiff
path: root/lib/igt_core.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/igt_core.c')
-rw-r--r--lib/igt_core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/igt_core.c b/lib/igt_core.c
index 6eb4798e..ae03e909 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -630,6 +630,8 @@ static void common_init_env(void)
if (!isatty(STDOUT_FILENO) || getenv("IGT_PLAIN_OUTPUT"))
__igt_plain_output = true;
+ errno = 0; /* otherwise may be either ENOTTY or EBADF because of isatty */
+
if (!__igt_plain_output)
setlocale(LC_ALL, "");