Volker Stolz wrote:
>
> While thumbing through W.R.Stevens� "Unix Network Programming" I found
> the following which should explain everything (except the
> platform-differences):
> "What happens is the �read� returns zero (end of file) to the daemon
> every time a client porcess terminates, if no other clients have the
> FIFO open for writing. [..] To avoid this, a useful technique is for the
> daemon to open the FIFO two times -- once for reading and once for
> writing. [..] By having the FIFO always open for writing [..] the reads
> to not return an EOF, but wait for the next client request."
>
> This solved the problem.
But how am I supposed to get this to work for sockets? If I try to
turn a socket into a handle twice I get a bind error.