sndioctl: Flush stdout before polling
authorratchov <ratchov@openbsd.org>
Wed, 3 Mar 2021 09:40:43 +0000 (09:40 +0000)
committerratchov <ratchov@openbsd.org>
Wed, 3 Mar 2021 09:40:43 +0000 (09:40 +0000)
commit74b220efb30d8b00307ad4dd56c66206bdfccf75
treef9c1f707c996e0c1d8c6e9a2b3e34734f833678d
parent4a8e8d61ba300efed7f1f952c84f7507916af19b
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 Erico Nogueira <ericonr@disroot.org>, idea
from Duncan Overbruck <mail@duncano.de>
usr.bin/sndioctl/sndioctl.c