From d05ac4a0785c8b6c91ec6037d26c918cfaa2e482 Mon Sep 17 00:00:00 2001 From: "Alex Xu (Hello71)" Date: Tue, 24 Aug 2021 10:39:12 -0400 Subject: [PATCH] alsactl: flush stdout for monitor command It may be useful to pipe the output to another program. Fixes: https://github.com/alsa-project/alsa-utils/pull/109 Signed-off-by: Alex Xu (Hello71) Signed-off-by: Jaroslav Kysela --- alsactl/monitor.c | 1 + 1 file changed, 1 insertion(+) diff --git a/alsactl/monitor.c b/alsactl/monitor.c index 4c02557..d293c09 100644 --- a/alsactl/monitor.c +++ b/alsactl/monitor.c @@ -235,6 +235,7 @@ static int print_event(snd_ctl_t *ctl, const char *name) if (mask & SND_CTL_EVENT_MASK_TLV) printf(" TLV"); printf("\n"); + fflush(stdout); return 0; }