Xref: utzoo comp.unix.programmer:2165 comp.unix.questions:32470 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!cs.uoregon.edu!ogicse!milton!sumax!polari!6sigma2 From: 6sigma2@polari.UUCP (Brian Matthews) Newsgroups: comp.unix.programmer,comp.unix.questions Subject: Re: why would a socket read() set errno to EWOULDBLOCK but still read? Message-ID: <4597@polari.UUCP> Date: 28 Jun 91 04:31:48 GMT References: <1991Jun27.220701.21108@athena.mit.edu> Distribution: usa Organization: Seattle Online Public Unix (206) 328-4944 Lines: 9 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. Errno is only valid if the read fails. If the read succeeds, the value of errno shouldn't be used. -- Brian L. Matthews blm@6sceng.UUCP