mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-12-22 22:56:31 +01:00
aplay/arecord: added isatty() check (interactive mode)
Turn off the interactive mode when stdin is not a tty. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
741064c601
commit
6de3c709b3
1 changed files with 4 additions and 0 deletions
|
@ -1394,6 +1394,10 @@ static void init_stdin(void)
|
|||
|
||||
if (!interactive)
|
||||
return;
|
||||
if (!isatty(fileno(stdin))) {
|
||||
interactive = 0;
|
||||
return;
|
||||
}
|
||||
tcgetattr(fileno(stdin), &term);
|
||||
term_c_lflag = term.c_lflag;
|
||||
if (fd == fileno(stdin))
|
||||
|
|
Loading…
Reference in a new issue