diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2007-06-24 20:08:58 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@xenon.tklauser.home> | 2007-06-24 20:08:58 +0200 |
commit | 86bad98403604f4738e8c252519755654f954eb0 (patch) | |
tree | 96102eb6a267573c309decc39da6da6b21c1606a /inotail.c | |
parent | 8748c6cedcd5d2d9c23a1c4b5aa019c82b735f90 (diff) |
inotail.c: Flush stdout in write_header()
To make sure the header is also printed when piping inotail output to
pipes.
Diffstat (limited to 'inotail.c')
-rw-r--r-- | inotail.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -119,8 +119,10 @@ static void write_header(char *filename) static unsigned short first_file = 1; static char *last = NULL; - if (last != filename) + if (last != filename) { fprintf(stdout, "%s==> %s <==\n", (first_file ? "" : "\n"), pretty_name(filename)); + fflush(stdout); /* Make sure the header is printed before the content */ + } first_file = 0; last = filename; |