bug-coreutils
[Top][All Lists]
Advanced

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

Re: inotify back end for tail -f on linux


From: Jim Meyering
Subject: Re: inotify back end for tail -f on linux
Date: Sat, 30 May 2009 14:38:23 +0200

Giuseppe Scrivano wrote:
>>From aa815abdd3cbf2ad15d769a1f4cb6100e3a975e5 Mon Sep 17 00:00:00 2001
> From: Giuseppe Scrivano <address@hidden>
> Date: Sat, 30 May 2009 13:31:58 +0200
> Subject: [PATCH]     tail: Use inotify if it is available.
>
>     * NEWS: Document the new feature
>     * configure.ac: Check if inotify is present.
>     * src/tail.c (main): Use the tail_forever inotify version if it
>     is possible.
>     (tail_forever_inotify): Added new function.

Thank you for writing that.  Seems like a fine start.

Note what happens whey you truncate a tracked file.
With your version, nothing.

With the original, it reports this:

  tail: F: file truncated

Likewise, when tailing with e.g., "tail -F FILE &"
if you unlink FILE, you get this:

  tail: `FILE' has become inaccessible: No such file or directory

and if you then recreate it:

  tail: `FILE' has appeared;  following end of new file

You get none of that with your patch.




reply via email to

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