From: Jaroslav Kysela Date: Fri, 22 Mar 2013 12:21:25 +0000 (+0100) Subject: aplay/arecord: added isatty() check (interactive mode) X-Git-Tag: v1.0.27~14 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=6de3c709b34c263e93a326e0a025c419ff3dd0f7;p=alsa-utils.git aplay/arecord: added isatty() check (interactive mode) Turn off the interactive mode when stdin is not a tty. Signed-off-by: Jaroslav Kysela --- diff --git a/aplay/aplay.c b/aplay/aplay.c index 4852b20..40d4f88 100644 --- a/aplay/aplay.c +++ b/aplay/aplay.c @@ -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))