From d313a0b24234d3366ec263111469f219f5b4634f Mon Sep 17 00:00:00 2001 From: Stephane Chazelas Date: Tue, 3 Feb 2015 21:22:06 +0000 Subject: tail: fix -f to follow changes after a rename * src/tail.c (tail_forever_inotify): Only monitor write()s and truncate()s to files in --follow=descriptor mode, thus avoiding the bug where we removed the watch on renamed files. Also adjust the inotify event processing code that is now significant only in --follow=name mode. * tests/tail-2/F-vs-rename.sh: Improve this existing test by running in both polling and inotify modes. * tests/tail-2/f-vs-rename.sh: A new test based on the existing one. * tests/local.mk: Reference the new test. * NEWS: Mention the bug. Fixes http://bugs.gnu.org/19760 --- tests/local.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/local.mk') diff --git a/tests/local.mk b/tests/local.mk index 56cba699a..1be31ad1d 100644 --- a/tests/local.mk +++ b/tests/local.mk @@ -171,6 +171,7 @@ all_tests = \ tests/tail-2/inotify-hash-abuse2.sh \ tests/tail-2/F-vs-missing.sh \ tests/tail-2/F-vs-rename.sh \ + tests/tail-2/f-vs-rename.sh \ tests/tail-2/inotify-rotate.sh \ tests/tail-2/inotify-rotate-resources.sh \ tests/chmod/no-x.sh \ -- cgit v1.2.3-70-g09d2