From: Jaroslav Kysela Date: Fri, 22 Mar 2013 12:27:26 +0000 (+0100) Subject: alsamixer: Use isatty() to check the terminal (interactive) availability X-Git-Tag: v1.0.27~16 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=5622f3b09fecbb19363db2b22b7060c27a65bb04;p=alsa-utils.git alsamixer: Use isatty() to check the terminal (interactive) availability Signed-off-by: Jaroslav Kysela --- 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);