bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch to fix data loss with `tail -F' (bug 6612)


From: Jim Meyering
Subject: Re: Patch to fix data loss with `tail -F' (bug 6612)
Date: Tue, 30 Sep 2008 10:37:54 +0200

Jos Backus <address@hidden> wrote:
> On Mon, Sep 29, 2008 at 10:37:31AM +0200, Andreas Schwab wrote:
>> Jos Backus <address@hidden> writes:
>>
>> > The `date' output shows up in the tail output. Also, this change only stops
>> > reading from the old file once the new file has some content. At that time 
>> > the
>> > old file is read until EOF and closed before starting on the new file.
>>
>> What if the old file keeps growing?
>
> "Too bad." With proper log rotation this never happens anyway.
>
> Perhaps this solution isn't perfect, but as it stands today `tail -F' is
> broken for tailing logfiles in that it _will_ lose data when the file is
> rotated. My test setup proves this. So something _has_ to be done.

Hi Jos,

Thanks for working on this.
However, if there's a motto in coreutils development, "do it right"
comes close, which you can interpret as making the code correct
(of course), robust, maintainable, portable and efficient.
We try not to compromise on any of those.

So, it'd be nice to solve this problem while also remaining faithful
to the documentation, which implies that with --follow=name, tail will
indeed detect the renaming, even if the original continues to grow.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]