[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] tail should dereference watched file
From: |
Ondrej Oprala |
Subject: |
[PATCH] tail should dereference watched file |
Date: |
Fri, 13 Sep 2013 17:42:40 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 |
Hi,
Since inotify is dereferencing the files it's told to watch (according
to flags tail sets), the watched files should be dereferenced outside
the inotify_* family of functions as well.
Example:
$ echo 1 > file
$ ln -sf file{,-link}
$ tail -F ./filelink > out 2>/dev/null
$ rm file
$ echo 2 > file
$ kill %1
$ cat out
results: out only contains the contents of "file" before it was deleted.
expected results: tail picks up on "file"'s reappearance.
To be precise, tail actually picks up on it. However, the list of
watched files from inotify is a list of files after dereferencing,
whereas tail compares it to the filenames of symlinks it got as
arguments, resulting ofc in unhappy users.
Thanks,
Ondrej
tail-deref.patch
Description: Text Data
- [PATCH] tail should dereference watched file,
Ondrej Oprala <=
- Re: [PATCH] tail should dereference watched file, Pádraig Brady, 2013/09/13
- Re: [PATCH] tail should dereference watched file, Pádraig Brady, 2013/09/13
- Re: [PATCH] tail should dereference watched file, Bernhard Voelker, 2013/09/15
- Re: [PATCH] tail should dereference watched file, Pádraig Brady, 2013/09/15
- Re: [PATCH] tail should dereference watched file, Bernhard Voelker, 2013/09/15
- Re: [PATCH] tail should dereference watched file, Ondrej Oprala, 2013/09/16
- Re: [PATCH] tail should dereference watched file, Bernhard Voelker, 2013/09/16
- Re: [PATCH] tail should dereference watched file, Pádraig Brady, 2013/09/16