From 5622f3b09fecbb19363db2b22b7060c27a65bb04 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Fri, 22 Mar 2013 13:27:26 +0100 Subject: [PATCH] alsamixer: Use isatty() to check the terminal (interactive) availability Signed-off-by: Jaroslav Kysela --- alsamixer/cli.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/alsamixer/cli.c b/alsamixer/cli.c index bb4f030..3f8f52f 100644 --- a/alsamixer/cli.c +++ b/alsamixer/cli.c @@ -115,6 +115,9 @@ fail: int main(int argc, char *argv[]) { + if (!isatty(fileno(stdin))) + return 0; + setlocale(LC_ALL, ""); #ifdef ENABLE_NLS_IN_CURSES textdomain(PACKAGE);