mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
tail: avoid new diagnostic when applying -f to a pipe on linux-2.3.38
* src/tail.c (fremote): Do not print a diagnostic when fstatfs (pipe_FD, &buf) fails, as it now does on linux-2.3.38. This avoids the spurious failure of tests/misc/tail's f-pipe-1 test, when running in input-from-pipe mode.
This commit is contained in:
1 parent
4afbba7bac
commit
8264fc615a
1 file changed
+5
-2
+5
-2
@@ -887,8 +887,11 @@ fremote (int fd, const char *name)
|
||||
int err = fstatfs (fd, &buf);
|
||||
if (err != 0)
|
||||
{
|
||||
error (0, errno, _("cannot determine location of %s. "
|
||||
"reverting to polling"), quote (name));
|
||||
/* On at least linux-2.6.38, fstatfs fails with ENOSYS when FD
|
||||
is open on a pipe. Treat that like a remote file. */
|
||||
if (errno != ENOSYS)
|
||||
error (0, errno, _("cannot determine location of %s. "
|
||||
"reverting to polling"), quote (name));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user