[pulseaudio-commits] Branch 'next' - src/utils

Tanu Kaskinen tanuk at kemper.freedesktop.org
Fri May 10 02:14:05 PDT 2013


 src/utils/pactl.c |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit 3673a45eed5429ffd9eedeab73edb74fa56f1963
Author: Nikolay Amiantov <nikoamia at gmail.com>
Date:   Sun May 5 15:22:53 2013 +0400

    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.

diff --git a/src/utils/pactl.c b/src/utils/pactl.c
index 0fb62cb..3b6770f 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) {



More information about the pulseaudio-commits mailing list