Subject: Test for EAGAIN

Test for EAGAIN

From: William Ahern <william_at_25thandclement.com>
Date: 2006-04-01

About a year ago I sent in a patch to make UDP non-blocking. In my comment I
said that the patch wasn't complete and we needed to add EAGAIN/EWOULDBLOCK
tests.

We forgot to do that, and I didn't catch it till yesterday.

I'll try to put together a patch, unless somebody beats me to it. This is
just an FYI.

In case you're wondering, yes, it is indeed possible to get a readiness
event, but for the data to not actually be there when you go to read. In
fact, this is why we made UDP non-blocking in the beginning. However, now
when the event comes in, we fail the read entirely instead of going back to
the pending state. In some circumstances this means Ares will fail a query
unnecessarily.

As I've been thinking about it, I wonder why there are different code
paths for TCP and UDP at all. We could probably reduce the amount of
code by merging these. Though, I guess that's for another time.

Daniel, are you still looking to hand over the project to somebody else? Has
that already occured?

- Bill
Received on Sat Apr 1 04:54:13 2006