mirror of https://github.com/ericonr/sndio.git
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:
parent
7a03da2848
commit
62bc69d71c
|
@ -1015,6 +1015,7 @@ main(int argc, char **argv)
|
|||
exit(1);
|
||||
}
|
||||
for (;;) {
|
||||
fflush(stdout);
|
||||
nfds = sioctl_pollfd(hdl, pfds, POLLIN);
|
||||
if (nfds == 0)
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue