sndioctl: Flush stdout before polling

If stdout is not flushed, output is not seen by programs using
sndioctl through a pipe (ex. "sndioctl -m | cat" displays nothing).

Patch from Érico Nogueira <ericonr@disroot.org>, idea
from Duncan Overbruck <mail@duncano.de>
This commit is contained in:
Alexandre Ratchov 2020-09-07 07:08:35 +02:00
parent 7a03da2848
commit 62bc69d71c
1 changed files with 1 additions and 0 deletions

View File

@ -1015,6 +1015,7 @@ main(int argc, char **argv)
exit(1);
}
for (;;) {
fflush(stdout);
nfds = sioctl_pollfd(hdl, pfds, POLLIN);
if (nfds == 0)
break;