#1040014 coreutils: tail: -f with inotify behaves differently than without when watching the same file twice

Package:
coreutils
Source:
coreutils
Description:
GNU core utilities
Submitter:
наб
Date:
2023-07-01 02:12:04 UTC
Severity:
normal
#1040014#5
Date:
2023-07-01 02:08:41 UTC
From:
To:
Dear Maintainer,

$ tail -f zupa zupa & sleep 0.1; echo zupa >> zupa
[1] 2883746
==> zupa <==
mupa

==> zupa <==
mupa

==> zupa <==
zupa
  but
$ tail ---disable-inotify -f zupa zupa & sleep 0.1; echo zupa >> zupa
[1] 2884513
==> zupa <==
mupa

==> zupa <==
mupa
$
==> zupa <==
zupa

==> zupa <==
zupa


The first one's obviously wrong, and maps trivially onto an inotify
artifact of having a single watch ID per inode.

Best,
наб