From cdfb703c5da31a798557722df516e0d01dac828a Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 7 Sep 2009 08:37:08 +0200 Subject: tail -f: handle "-"/stdin once again * src/tail.c (main) [HAVE_INOTIFY]: When stdin (i.e., "-", or no args, but not /dev/stdin) is specified on the command line, don't use inotify. Reported by Bill Brelsford in . * tests/tail-2/follow-stdin: New file. Test for this. * tests/Makefile.am (TESTS): Add the test. * NEWS (Bug fixes): Mention it. This bug was introduced in coreutils-7.5 via commit ae494d4b, 2009-06-02, "tail: use inotify if it is available". --- NEWS | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index b02d2daea..5c7fb82be 100644 --- a/NEWS +++ b/NEWS @@ -31,6 +31,15 @@ GNU coreutils NEWS -*- outline -*- Before, this would print nothing and wait: stdbuf -o 4K tail -f /etc/passwd Note that this bug affects tail -f only when its standard output is buffered, which is relatively unusual. + [bug introduced in coreutils-7.5] + + tail -f once again works with standard input. inotify-enabled tail -f + would fail when operating on a nameless stdin. I.e., tail -f < /etc/passwd + would say "tail: cannot watch `-': No such file or directory", yet the + relatively baroque tail -f /dev/stdin < /etc/passwd would work. Now, the + offending usage causes tail to revert to its conventional sleep-based + (i.e., not inotify-based) implementation. + [bug introduced in coreutils-7.5] ** New features -- cgit v1.2.3-54-g00ecf