]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(main): Warn about following stdin only when it's a tty.
authorJim Meyering <jim@meyering.net>
Mon, 12 Jan 2004 09:41:29 +0000 (09:41 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 12 Jan 2004 09:41:29 +0000 (09:41 +0000)
src/tail.c

index 7f992d896265337778d805e5f45bc7dd2760cb2e..7e574a3ebafb7025e64f47e7c2ef5a613e76f680 100644 (file)
@@ -1725,7 +1725,7 @@ main (int argc, char **argv)
     /* When following forever, warn if any file is `-'.
        This is only a warning, since tail's output (before a failing seek,
        and that from any non-stdin files) might still be useful.  */
-    if (forever && found_hyphen)
+    if (forever && found_hyphen && isatty (STDIN_FILENO))
       error (0, 0, _("warning: following standard input"
                     " indefinitely is ineffective"));
   }