coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

tail: -f and -F stall on a read when a FIFO writer connects and stays silent

Open Khushi6767 opened this issue 3 weeks ago • 0 comments

Follow-up to #15769 and #16208.

#16208 stops the blocking open() of a followed name that was replaced by a FIFO. The read side has a similar case that is not covered: when a writer opens the FIFO and then sends nothing, the descriptor is in blocking mode and the read in tail_file waits on the single thread that serves all followed files. Output for the other files stops until the writer sends data or closes the FIFO.

Expected: like GNU tail, keep printing the other files. GNU reads such a FIFO without blocking.

A possible direction: keep O_NONBLOCK on followed FIFOs and treat WouldBlock from the read as "no new data".

Khushi6767 avatar Nov 10 '26 12:11 Khushi6767