I posted a few years ago about a named pipe issue, and I am having the same problem again.
So here is a quick description of what I am trying to do:
I have a socket, where my process is waiting for either more incoming data coming to it, or waiting on outgoing data being ready via a named pipe. For this I am using a select on a named pipe, and on the socket, and both have been opened in non-blocking mode.
Now, when i do the select, the named pipe fd always says unblocked, but the socket is fine, in that the select does not return. If I don't open the named pipe in non-blocking mode, then the open command for the named pipe will block itself, and I won't be able to wait for incoming socket data.
What should I do?? Should opening/closing the named pipe for each select solve this?
A second question about the write to the named pipe. i am also opening it in non-blocking mode, and then waiting on the select to pick up that there is data to be read. Would this work?
This is quite urgent, so any help would be greatly appreciated.