]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix a buffering problem, so the output can sensibly be piped through
authorJulian Seward <jseward@acm.org>
Sun, 3 Nov 2002 23:27:40 +0000 (23:27 +0000)
committerJulian Seward <jseward@acm.org>
Sun, 3 Nov 2002 23:27:40 +0000 (23:27 +0000)
/usr/bin/tee.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1276

auxprogs/valgrind-listener.c

index d7f8561e2e84163ea3232c6c308316b757aaa679..15dc8e65e54d1ba8eac72310d8917c79b29bee47 100644 (file)
@@ -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) {