Quoting "Roy T. Fielding" <[EMAIL PROTECTED]>:
On Jan 4, 2006, at 4:42 PM, [EMAIL PROTECTED] wrote:
Quoting Garrett Rooney <[EMAIL PROTECTED]>:
Um, I don't think that's going to work, rv is the number of
descriptors that hit, there's nothing that says that if N hit it'll be
the first N...
That would be true were I comparing I<RV but I'm comapring J<RV :D
- for (i = 0; i < pollset->nelts; i++) {
+ for (i = 0; j < rv; i++) {
I have a vague recollection that there was some reason we couldn't
trust the return value being equal to the number of ready descriptors
on some platform, but I have no time to search the archives for why.
I may be remembering something related to ... er .. that other call
like poll... hmmm, oh, select. Or maybe I just need more caffeine.
....Roy
You are correct, select() returns the total number of descriptors in
the FDSET rather than those which have had events.
However the patch applies specifically to the poll() implementation for
pollset, select() remains unchanged for that very reason.