Xref: utzoo comp.unix.programmer:2163 comp.unix.questions:32468 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!batcomputer!caen!zaphod.mps.ohio-state.edu!think.com!hsdndev!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: comp.unix.programmer,comp.unix.questions Subject: Re: why would a socket read() set errno to EWOULDBLOCK but still read? Message-ID: <16853.Jun2803.12.2991@kramden.acf.nyu.edu> Date: 28 Jun 91 03:12:29 GMT References: <1991Jun27.220701.21108@athena.mit.edu> Distribution: usa Organization: IR Lines: 11 In article <1991Jun27.220701.21108@athena.mit.edu> mlevin@jade.tufts.edu writes: > I am doing a read() on a connected TCP socket (BSD 4.3) marked as > non-blocking. For some reason, the read returns the proper number of > characters read (or sometimes 0), but sets errno to EWOULDBLOCK. The Golden Errno Rule: He who inspects errno before a system call returns failure shall be buried before he is dead. ---Dan