On 24/10/10 02:39, Paul Eggert wrote: > I got the following failure when running "make test" > on RHEL 5.5 x86-64 when the build directory is served > from a Network Appliance filer. I'm no expert in what > "tail" is supposed to do here, but a casual look at the > output makes it appear that it might just be a bug in > the test program. The filer does suffer from minor > clock skew with respect to the RHEL client. > > FAIL: tail-2/F-vs-missing (exit: 1) > =================================== > > tail: cannot open `missing/file' for reading: No such file or directory > tail: cannot watch parent directory of `missing/file': No such file or > directory > tail: inotify cannot be used, reverting to polling > tail: `missing/file' has been replaced with a remote file. giving up on this > name > + fail=1
Seems like an edge case I didn't consider in 61b77891 Hopefully the attached fixes it. cheers, Pádraig.
>From d0781181b44e26e81e5daf7ec7de8fd84fecab35 Mon Sep 17 00:00:00 2001 From: =?utf-8?q?P=C3=A1draig=20Brady?= <[email protected]> Date: Sun, 24 Oct 2010 14:02:12 +0100 Subject: [PATCH] tail: support rechecking remote files in currently missing dirs src/tail.c (main): As an optimization, don't bother checking stdin or for remote files, when ---disable-inotify specified. To improve the fix in commit 61b77891, set the disable_inotify flag when we fall back to polling, so that we recheck remote files. NEWS: Mention the fix --- NEWS | 5 +++++ src/tail.c | 1 + 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/NEWS b/NEWS index f28c243..7dbbf1f 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,11 @@ GNU coreutils NEWS -*- outline -*- * Noteworthy changes in release ?.? (????-??-??) [?] +** Bug fixes + + tail -F once again notices changes in a currently unavailable + remote directory [bug introduced in coreutils-7.5] + * Noteworthy changes in release 8.6 (2010-10-15) [stable] diff --git a/src/tail.c b/src/tail.c index 68cc819..5c8f9a3 100644 --- a/src/tail.c +++ b/src/tail.c @@ -2189,6 +2189,7 @@ main (int argc, char **argv) error (0, errno, _("inotify cannot be used, reverting to polling")); } #endif + disable_inotify = true; tail_forever (F, n_files, sleep_interval); } -- 1.6.2.5
