Opening of blocking FIFOs not reliable?
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
--
Quoted 2 lines · Teemu Koponen
the reader gets scheduled. Shouldn't the writer's
open()block until the reader'sopen()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