mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-12-22 13:46:30 +01:00
alsamixer: Use isatty() to check the terminal (interactive) availability
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
bfcb26f9f7
commit
5622f3b09f
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue