Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a warn-and-fail bug in kqueue by providing kevent() room to repor…
…t errors Apparently, kevent fails gracefully if there is not enough space in its output events array to report every _event_... but it just dies and returns -1 if there is not enough space to report every _error_. There are a couple of possible fixes here. One would to handle -1 returns from kevent better by re-growing the array and retrying... but that seems a little error prone. Instead, I'm just going to say that the events array must be large enough to handle all the errors. This patch also adds a unit test designed to make sure that our many-events-out code works even if not all the events are added at once.
- Loading branch information
1 parent
9556a7d
commit 28317a0
Showing
2 changed files
with
50 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters