Hi
This is my first post on this forum!
I have a process where I am opening a named pipe (in non blocking mode) and then doing a select on, waiting for other processes to write to the pipe.
However, what i noticed is that once a select is successful and a process has written to it, the subsequent selects all say that it is ready to read, when there is no data (as no other process has written to the pipe after that).
Just as a note that i am doing a FD_ZERO of the named pipe descriptor before each select, and after the FD_ISSET is checked and is true for the named pipe, I am doing a FD_CLEAR on it as well.
This is a bit strange, as the whole point of using select is to know when there is data available to be read.
However, if I close/open the pipe after the read, then it's fine again and the select keeps doing what i need it to do.
Any help in fixing this problem/clarifying what I have observed would be gratefully accepted!