If this is an option, use unix domain sockets for a script like this. Because of the semantics of FIFO, this is an awkward way to do this, and you are likely to run into problems anyway. And this design will not scale outside of one client if it becomes necessary. In the short term, you can secure your will in FIFO, but I suspect you will regret it.
Outlets are more natural for this. Your auditory socket fits perfectly into your existing survey (), the client connects, the writer discards his data, both end the disconnection, and everyone is happy. No fuss, no mousse.
source share