[comp.unix.wizards] Problem with select

leight@mozart.amd.com (Timothy S. Leight) (06/12/90)

Can anyone out there give me some hints as to what
is causing this problem:

In attempting to read from a socket, I first use a select(2),
to wait on data to arrive on the socket. The select(2) call
returns with errno=0 and the correct discriptor
value. After checking everything, I then read(2) from
the socket descriptor. In checking the number of characters read
from the socket, I find the number of characters in the buffer
is zero and errno after the read(2) is zero.

This happens about 1% of the time this section of code is
executed. The rest of the time the code works as I
expect it to, returning a non-zero number of characters in
the buffer.

Any help all would be appreciated.

Thanks in advance

tim leight
leight@mozart.amd.com