coreutils
[Top][All Lists]
Advanced

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

tail --follow with inotify doesn't distinguish hardlinks


From: Pádraig Brady
Subject: tail --follow with inotify doesn't distinguish hardlinks
Date: Thu, 05 Feb 2015 14:04:39 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

For the record, I noticed another edge case with tail's
inotify implementation, documented in the attached patch.

Due to not distinguishing hardlinks, followed data for
only one of the hardlinked names is output.

$ echo 1 >file
$ ln file fileln


======== Inotify case ==============
$ tail -F file fileln
==> file <==
1

==> fileln <==
1
2 <-------------------------------- echo 2 > file




======== Non inotify case ==============
$ tail -F ---dis file fileln
==> file <==
1
2

==> fileln <==
1
2
  <-------------------------------- echo 3 > file
==> file <==
3

==> fileln <==
3



cheers,
Pádraig.

Attachment: tail-inotify-links.patch
Description: Text Data


reply via email to

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