Well, lots of people tell him that this means EOF and the other endQuote:>I have a non-blocking tcp-ip socket that I do a select() on to see if
>there's data. select() says there's data. I do a read() on the socket
>and zero bytes read is returned. I know there should be data to be
>read. And in any case if there wasn't data, read() should return a -1
>Most of the time this doesn't happen, but under some circumstances it
>does, with the result being a tight loop with select() and read()
>being called and the process taking up nearly all the CPU cycles.
>Does anyone have any idea what is happening?
>(This is on a Sun SparcStation 5 running Solaris 2.5)
has gone away
I had a problem with Sun where a select says that there is data, a
read gets a zero return, a second select says there is data again
(perhaps later on!) and a read then gets real data.
So I only counted the other end dead after several consecutive zero