From: Julian Seward Date: Sun, 3 Nov 2002 23:27:40 +0000 (+0000) Subject: Fix a buffering problem, so the output can sensibly be piped through X-Git-Tag: svn/VALGRIND_1_9_4~171 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4fce11195ca96a8a072b02870f630e8e60fc6775;p=thirdparty%2Fvalgrind.git Fix a buffering problem, so the output can sensibly be piped through /usr/bin/tee. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1276 --- diff --git a/auxprogs/valgrind-listener.c b/auxprogs/valgrind-listener.c index d7f8561e2e..15dc8e65e5 100644 --- a/auxprogs/valgrind-listener.c +++ b/auxprogs/valgrind-listener.c @@ -96,6 +96,7 @@ void copyout ( char* buf, int nbuf ) fwrite(&buf[i], 1, 1, stdout); } } + fflush(stdout); } int read_from_sd ( int sd ) @@ -200,6 +201,7 @@ int main (int argc, char *argv[]) { printf("\n(%d) -------------------- CONNECT " "--------------------\n(%d)\n(%d) ", conn_count, conn_count, conn_count); + fflush(stdout); } } @@ -244,6 +246,7 @@ int main (int argc, char *argv[]) { printf("\n(%d) ------------------- DISCONNECT " "-------------------\n(%d)\n(%d) ", conn_count, conn_count, conn_count); + fflush(stdout); } else if (conn_pollfd[i].revents & POLLIN) {