luaposix/luaposix — pull request #95 by zevv (2013-04-17 17:35:30+00:00)
Title: I broke poll with commit 8deb0ebd041ab6d4761f86a7a906dd850111bae7

Earlier commit changed poll() to only set active events in the revents table for performance reasons.

The result is just fine for calling poll() only once, but breaks things for subsequent calls to poll() when passing the same table again. In this case, the inactive events are not cleared from the revents table, causing false positives. This patch reverts to the original behavior.

(I did some performance tests with setting the inactive events to nil instead of false, but the difference is hardly noticable)