From: Jim Meyering Date: Wed, 3 Nov 1999 12:13:39 +0000 (+0000) Subject: (recheck): Don't refuse to tail a non-regular, non-pipe. X-Git-Tag: FILEUTILS-4_0j-trial~107 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=670f9b2f8a0ac7b426152acd4d10aefb67452500;p=thirdparty%2Fcoreutils.git (recheck): Don't refuse to tail a non-regular, non-pipe. (tail_file): Likewise. --- diff --git a/src/tail.c b/src/tail.c index 40ce9f02aa..c2a3ca4bb7 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));