Re: tail: --pid option does not work when input is a FIFO

2025-01-07 Thread Bernhard Voelker
On 1/7/25 16:08, Pádraig Brady wrote: I'll push the attached later, which is a little more conservative in that it only opens with O_NONBLOCK if possibly needed. +1 thanks! Have a nice day, Berny

Re: tail: --pid option does not work when input is a FIFO

2025-01-07 Thread Pádraig Brady
On 19/10/2024 08:48, Bernhard Voelker wrote: Hi Padraig, On 10/18/24 14:50, Pádraig Brady wrote: In my testing the initial open() of the fifo blocks, before the -f loops are processed. If the monitored file was written by another process, this_does_ unblock things for me, and --pid is processe

Re: tail: --pid option does not work when input is a FIFO

2024-10-19 Thread Bernhard Voelker
Hi Padraig, On 10/18/24 14:50, Pádraig Brady wrote: In my testing the initial open() of the fifo blocks, before the -f loops are processed. If the monitored file was written by another process, this_does_ unblock things for me, and --pid is processed. The attached patch avoids the blocking beh

Re: tail: --pid option does not work when input is a FIFO

2024-10-18 Thread Pádraig Brady
On 17/10/2024 22:38, Bernhard Voelker wrote: Hi *, I noticed that 'tail --pid' does not work when the file to follow is a FIFO. Shouldn't --pid behave the same regardless whether it's a pipe or not? # Good case. $ rm f; touch f # tail to follow regular file. $ sleep 5 & timeout 10 tail -f --pi