Marc Lehmann <[email protected]> writes: > On Thu, Mar 25, 2010 at 04:53:02PM +0300, Zajcev Evgeny <[email protected]> > wrote: >> at the for time `polls' looks like this: >> {fd = 3, events = 1, revents = 0} >> {fd = 6, events = 5, revents = 4} >> {fd = 775043377, events = 13873, revents = 11832} (**) >> ... >> i don't know `res' value, but i suppose it was 2. > > The value of res would be helpful. If res is two, then this is a kernel > bug that you should report (or maybe upgrade to a fixed version), not a > bug in libev. > >> of course this situation is incorrect for the code above, because `p' >> will eventually point to (**) uninitialized record (but present in >> memory). > > Only if poll returns an illegal return code. > >> So, i think `res' must decrease in conjunction with `p' increasement, >> like this: > > Then we would miss events, as not all poll structs have events, and we > would only look at the first "res", and not all with nonzero result code. > >> for (p = polls; res--; ++p) > >> what do you think? > > All depends on what res is. If res is two, then this is clearly a kernel > bug.
aha, i will investigate futher and report. i've heard from others they have glitches with FreeBSD's poll too thanks for your help Marc [..] -- lg _______________________________________________ libev mailing list [email protected] http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev
