Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!ames!amdcad!mozart.amd.com!mozart!leight From: leight@mozartamd.com (Timothy Leight) Newsgroups: comp.unix.wizards Subject: Select(2)/Read(2) and/or socket programming problem Message-ID: <1990Jun11.220902.8905@mozart.amd.com> Date: 11 Jun 90 22:09:02 GMT Sender: usenet@mozart.amd.com (Usenet News) Reply-To: leight@mozartamd.com (Timothy Leight) Organization: Advanced Micro Devices, Inc. Lines: 23 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 a buffer. Any hints at all about what could be happening whould be appreciated. Thanks in advance Tim Leight