The fifo problem is the problem. Read from the slot instead. This will be more consistent with the Twisted event-driven model. Trying to do anything outside the control of the reactor is usually the wrong approach.
---- feedback-based update that fifo is an external constraint and not prevented ----
OK, the central problem is that you cannot write code in the main (and only) thread of your Twisted application, which blocks read requests on fifo. This will stop the entire application if there is nothing to read. Thus, you either look at fifo asynchronously, create a separate stream to read it, or split the application into two.
The last option - the easiest - change the Twisted application so that it listens on the socket and writes a separate small redirector application that runs in a simple loop, reads fifo and writes everything it hears to the socket.
source share