Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!usc!apple!sun-barr!newstop!sun!amdcad!mozart.amd.com!leight From: leight@mozart.amd.com (Timothy S. Leight) Newsgroups: comp.unix.wizards Subject: Problem with select(2)/read(2) and/or socket programming Message-ID: <1990Jun11.223135.9495@mozart.amd.com> Date: 11 Jun 90 22:31:35 GMT Sender: leight@mozart.amd.com (Timothy Leight) Organization: Advanced Micro Devices, Inc. Lines: 22 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