alsamixer: Use isatty() to check the terminal (interactive) availability

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2013-03-22 13:27:26 +01:00
parent bfcb26f9f7
commit 5622f3b09f

View file

@ -115,6 +115,9 @@ fail:
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
if (!isatty(fileno(stdin)))
return 0;
setlocale(LC_ALL, ""); setlocale(LC_ALL, "");
#ifdef ENABLE_NLS_IN_CURSES #ifdef ENABLE_NLS_IN_CURSES
textdomain(PACKAGE); textdomain(PACKAGE);