diff options
author | Nikolay Amiantov <nikoamia@gmail.com> | 2013-05-05 15:22:53 +0400 |
---|---|---|
committer | Arun Raghavan <arun.raghavan@collabora.co.uk> | 2013-06-04 00:38:41 +0530 |
commit | 8cc4e7786f04929c55f12d480b38bb484506eee4 (patch) | |
tree | 2ff4e7239f254ddec0aa890388ba7a1fbe62dc44 /src/utils | |
parent | cfb96b2530690df113e1aceb5b82fc166f9d2cfd (diff) | |
download | pulseaudio-8cc4e7786f04929c55f12d480b38bb484506eee4.tar.gz |
pactl: Flush stdout buffer when printing subscribe events.
"pactl subscribe" is running continuously, and without flushing its output is
not usable for "process-on-arrival" per-line tasks, such as grepping. This
patch should fix this. For example, now:
pactl subscribe | grep 'server'
should print only server events as they arrive.
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/pactl.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/utils/pactl.c b/src/utils/pactl.c index 0fb62cb06..3b6770f05 100644 --- a/src/utils/pactl.c +++ b/src/utils/pactl.c @@ -1169,6 +1169,7 @@ static void context_subscribe_callback(pa_context *c, pa_subscription_event_type subscription_event_type_to_string(t), subscription_event_facility_to_string(t), idx); + fflush(stdout); } static void context_state_callback(pa_context *c, void *userdata) { |