python-inotify-tail_example icon indicating copy to clipboard operation
python-inotify-tail_example copied to clipboard

Tailing of re-created files

Open petski opened this issue 12 years ago • 1 comments

An issue reveals itself when tailing files that are re-created. The following snippet shows what happens. GNU's 'tail -F' shows "1 2 4 5 6"

term a:

$ touch /tmp/myfile

term b:

$ python tail-F_inotify.py --debug /tmp/myfile

term a:

$ echo 1 >> /tmp/myfile
$ echo 2 >> /tmp/myfile
$ echo 3 > /tmp/myfile # > instead of >>
$ echo 4 >> /tmp/myfile
$ echo 5 >> /tmp/myfile
$ echo 6 >> /tmp/myfile

term b output:

I am totally opening /tmp/myfile
1
2


5
6

petski avatar May 30 '13 07:05 petski

Thanks for your report! I think in later implementations, I've fixed this... but never added the code to this example app. I'll get it merged soon.

manos avatar Jul 16 '13 16:07 manos