mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
(main): Warn about following stdin only when it's a tty.
This commit is contained in:
1 parent
63cd5e88a1
commit
ace768ee42
1 file changed
+1
-1
+1
-1
@@ -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"));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user