Skip to contentSkip to conversation

Opening of blocking FIFOs not reliable?

DISCUSSION Teemu Koponen 2 participants 2 messages Aug 13, 2005 – Aug 14, 2005

lore
Share & tools
lore
#0 lore raw

Hi,

Opening a FIFO for WR_ONLY should release a previously blocked RD_ONLY open. I suspect this is not guaranteed on a heavily loaded Linux box.

Consider fs/fifo.c (of 2.6.13-rc6-git4) and its wait_for_partner() and wake_up_partner() functions. I think wait_for_partner()'s while loop never exits, *iff* the writer, after opening the FIFO, closes it before the reader gets scheduled. Shouldn't the writer's open() block until the reader's open() is done?

Teemu

--

#1 lore raw
Quoted 2 lines · Teemu Koponen

the reader gets scheduled. Shouldn't the writer's open() block until the reader's open() is done?

Not neccessarily - but you are correct that it should lead to the readers open completing and then EOFs being returned. Do you have a test case for the problem?

Alan