summaryrefslogtreecommitdiff
path: root/src/tail.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2004-01-12 09:41:29 +0000
committerJim Meyering <jim@meyering.net>2004-01-12 09:41:29 +0000
commitace768ee42c3202071cb0e0c4916994fccc9fdb6 (patch)
tree48dc4e6b9dbec9967b24b710f9cadf0d103a47da /src/tail.c
parent63cd5e88a1c12d875be410fb6c9c6f49d221feae (diff)
downloadcoreutils-ace768ee42c3202071cb0e0c4916994fccc9fdb6.tar.xz
(main): Warn about following stdin only when it's a tty.
Diffstat (limited to 'src/tail.c')
-rw-r--r--src/tail.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tail.c b/src/tail.c
index 7f992d896..7e574a3eb 100644
--- a/src/tail.c
+++ b/src/tail.c
@@ -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"));
}