Shaun Jackman pointed out that dprintf(STDOUT_FILENO,...) is just a printf.
authorRob Landley <rob@landley.net>
Sat, 7 May 2005 07:53:16 +0000 (07:53 -0000)
committerRob Landley <rob@landley.net>
Sat, 7 May 2005 07:53:16 +0000 (07:53 -0000)
coreutils/tail.c

index e3f89d2eea5424c1661e02a6fb9ac54c337d3d59..ef00383853831a7f183a5ba506ae73d1b4e05bc7 100644 (file)
@@ -62,7 +62,8 @@ static int status
 static void tail_xprint_header(const char *fmt, const char *filename)
 {
        /* If we get an output error, there is really no sense in continuing. */
-       if (dprintf(STDOUT_FILENO, fmt, filename) < 0) {
+       if (printf(fmt, filename) < 0 ||
+                       fflush(stdout) < 0) {
                bb_perror_nomsg_and_die();
        }
 }