why would a socket read() set errno to EWOULDBLOCK but still read?
Dan Bernstein
brnstnd at kramden.acf.nyu.edu
Fri Jun 28 13:12:29 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.
The Golden Errno Rule:
He who inspects errno before a system call returns failure
shall be buried before he is dead.
---Dan
More information about the Comp.unix.questions
mailing list