why would a socket read() set errno to EWOULDBLOCK but still read?

Brian Matthews 6sigma2 at polari.UUCP
Fri Jun 28 14:31:48 AEST 1991


In article <1991Jun27.220701.21108 at athena.mit.edu> mlevin at 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 at 6sceng.UUCP



More information about the Comp.unix.programmer mailing list