diff options
author | Jim Meyering <jim@meyering.net> | 1999-11-03 12:13:39 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1999-11-03 12:13:39 +0000 |
commit | 670f9b2f8a0ac7b426152acd4d10aefb67452500 (patch) | |
tree | 3ba595d43791b1e3852b4608482f9f7e8016f335 /src/tail.c | |
parent | 789f74708c5be9452a4eba4f3f830e4dd643f1f6 (diff) | |
download | coreutils-670f9b2f8a0ac7b426152acd4d10aefb67452500.tar.xz |
(recheck): Don't refuse to tail a non-regular, non-pipe.
(tail_file): Likewise.
Diffstat (limited to 'src/tail.c')
-rw-r--r-- | src/tail.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/tail.c b/src/tail.c index 40ce9f02a..c2a3ca4bb 100644 --- a/src/tail.c +++ b/src/tail.c @@ -736,16 +736,6 @@ recheck (struct File_spec *f) error (0, errno, "%s", pretty_name (f)); } } - else if (!S_ISREG (new_stats.st_mode) - && !S_ISFIFO (new_stats.st_mode)) - { - fail = 1; - f->errnum = -1; - error (0, 0, - _("`%s' has been replaced with a non-regular file; \ -cannot follow end of non-regular file"), - pretty_name (f)); - } else { f->errnum = 0; @@ -1121,13 +1111,7 @@ tail_file (struct File_spec *f, off_t n_units) errors = 1; f->errnum = errno; } - else if (!S_ISREG (stats.st_mode) && !S_ISFIFO (stats.st_mode)) - { - error (0, 0, _("%s: cannot follow end of non-regular file"), - pretty_name (f)); - errors = 1; - f->errnum = -1; - } + if (errors) { close_fd (fd, pretty_name (f)); |