in thread read() implementation, there is this line of code:

                while ((ret = _thread_sys_read(fd, buf, nbytes)) < 0) {

suppose we're doing the IO on a TCP socket: _thread_sys_read() is going to
return -1 if there is no data available in the stream and the errno is then 
set to EAGAIN, so let's say we come back to the _thread_sys_read() call again,
this time it successed, however, the errno is still 35 (EAGAIN).  
My question is, shouldn't it be reset to zero?

So basically, if you do a read() call on TCP socket in your MT program and
the errno will be 35 even tho the read() call returns no error.  

BTW, this is 4.0-stable



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to