[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
tail bug - starting in 7.5 "tail --follow=name" behaves like "tail --fol
From: |
Tim Underwood |
Subject: |
tail bug - starting in 7.5 "tail --follow=name" behaves like "tail --follow=name --retry" |
Date: |
Thu, 21 Apr 2011 12:43:40 -0700 |
Going from Ubuntu 10.04 (coreutils 7.4) to Ubuntu 10.10 (coreutils 8.5) I
noticed that "tail --follow=name" started behaving like "tail --follow=name
--retry". It looks like the issue started in 7.5 and still exists in 8.9.
To reproduce:
tail --follow=name this_file_does_not_exist
The expected behavior is:
$ ./coreutils-7.4/src/tail --follow=name this_file_does_not_exist
./coreutils-7.4/src/tail: cannot open `this_file_does_not_exist' for
reading: No such file or directory
./coreutils-7.4/src/tail: no files remaining
The wrong behavior is:
$ ./coreutils-7.5/src/tail --follow=name this_file_does_not_exist
./coreutils-7.5/src/tail: cannot open `this_file_does_not_exist' for
reading: No such file or directory
<tail waits forever for this_file_does_not_exist to become available which
is what --retry is for>
Here's the wrong behavior on 8.9:
$ ./coreutils-8.9/src/tail --follow=name this_file_does_not_exist
./coreutils-8.9/src/tail: cannot open `this_file_does_not_exist' for
reading: No such file or directory
<waits forever...>
My specific use case is to tail a log file until it gets deleted at which
point tail should exit allowing my script to continue.
-Tim
- tail bug - starting in 7.5 "tail --follow=name" behaves like "tail --follow=name --retry",
Tim Underwood <=