summaryrefslogtreecommitdiff
path: root/alsamixer
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2013-03-22 13:27:26 +0100
committerJaroslav Kysela <perex@perex.cz>2013-03-22 13:27:26 +0100
commit5622f3b09fecbb19363db2b22b7060c27a65bb04 (patch)
tree896033ef76c6ef46ac537262056b23e14bc0bd57 /alsamixer
parentbfcb26f9f7b893e24ebeeb76232c5cd0066d087e (diff)
alsamixer: Use isatty() to check the terminal (interactive) availability
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'alsamixer')
-rw-r--r--alsamixer/cli.c3
1 files changed, 3 insertions, 0 deletions
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);