http://qs1969.pair.com?node_id=134128


in reply to Named pipes missing connections

Pipes don't serialize or check for things like two readers and writers. You can have a reader "A" open the pipe with writer "A", and then switch writers on the reader (by starting another writer "B" and THEN closing writer "A"). The reader sees an EOF only if a read attempt is made when no one is WRITING to it. This is further complicated by the fact that two different processes (Reader and writer) are not synched in other ways.

I recommend:

I must admit I did not experiment with your code so there might be other reasons (but locking is a good idea if you have the remotest chance that two writers will need to talk at the same time).

-- termix