tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: FIFO blocking behaviour



On Wed, 16 Sep 2026, Edgar Fuß wrote:

Are you sure you're not confusing this with the behaviour (which I *do*
expect) of seeing the FIFO open block until a matching open is done?
Ah, sorry, that's probably it. So, is /that behaviour/ guaranteed?


That's I've always found it. It would surprise me very much if any system
behaved differently.

Is it safe to have process A create the FIFO, pass the name to process B,
open it for writing (write to it), and then "immediately" delete it?
Is it then guaranteed that process B will be able to open the FIFO (and,
of course, read from it)?


How'll B find the FIFO if it's been deleted before it can be opened?
But if you mean:

B waits for A to send it the name of the FIFO it'll create,
A creates the FIFO and passes name to B,
B opens FIFO for reading.
A deletes FIFO & waits an arbitrary amt. of time before writing,
then B will read what A wrote (subject to PIPE_BUF limits) even if the FIFO
is gone.

-RVP


Home | Main Index | Thread Index | Old Index