Dear Maintainer,
This came out of a linux-fsdevel@ discussion:
https://lore.kernel.org/linux-fsdevel/jbyihkyk5dtaohdwjyivambb2gffyjs3dodpofafnkkunxq7bu@jngkdxx65pux/t/#u
According to Amir, at least, it is "correct" that inotify-watching fifos
is unsupported, and tail(1) speaks of using inotify. Let's see:
-- >8 --
$ echo zupa > fifo
$ echo zupa > fifo
$ echo zupa > fifo
$ echo cupa | strace cat > fifo
...
splice(0, NULL, 1, NULL, 134217728, SPLICE_F_MOVE|SPLICE_F_MORE) = 5
splice(0, NULL, 1, NULL, 134217728, SPLICE_F_MOVE|SPLICE_F_MORE) = 0
...
$ strace < /bin/cat cat > fifo
splice(0, NULL, 1, NULL, 134217728, SPLICE_F_MOVE|SPLICE_F_MORE) = 44016
splice(0, NULL, 1, NULL, 134217728, SPLICE_F_MOVE|SPLICE_F_MORE) = 0
(a couple times until)
$ strace < /bin/cat cat > fifo
splice(0, NULL, 1, NULL, 134217728, SPLICE_F_MOVE|SPLICE_F_MORE) = 32768
splice(0, NULL, 1, NULL, 134217728, SPLICE_F_MOVE|SPLICE_F_MORE <- sleeps here
^C
$ echo qupa > fifo <- sleeps in open
-- >8 --
yields
-- >8 --
$ tail -f fifo
zupa
zupa
zupa
-- >8 --
and at this point fifo is full but inotify hasn't returned an event and
thus service has been denied.
According to Amir, at least, this is expected behaviour, and while he
"doesn't think" it is, the only correct way of polling a pipe under Linux
I see is to fall back to classic UNIX sleep()/read().
Best,
наб