Branch :
| Author | Commit | Date | CI | Message |
|---|---|---|---|---|
| e49e2891 | 2012-02-10 17:29:53 | Update copyright notices to 2012 | ||
| 1aee7183 | 2011-10-26 13:24:30 | epoll: close fd on alloc fail at initialization If the memory allocations fail then we free any other allocated structures but don't close the file descriptor resulting in an leak of fd's. | ||
| 3c824bd3 | 2011-10-24 13:18:09 | Update copyright dates to 2011. | ||
| 9531763a | 2010-11-14 17:52:16 | Disable changelist for epoll by default because of Linux dup() bug; add an option and/or an envvar to reenable it for speed. Rename option to control epoll changelist; make epoll changelist off by default | ||
| 2c66983a | 2010-10-24 11:51:14 | Simplify the logic for choosing EPOLL_CTL_ADD vs EPOLL_CTL_MOD Previously, we chose "ADD" whenever old_events==new_events, (since we expected the add to fail with EEXIST), or whenever old_events was==0, and MOD otherwise (i.e., when old_events was nonzero and not equal to new_events). But now that we retry failed MOD events as ADD *and* failed ADD events as MOD, the important thing is now to try to guess right the largest amount of the time, since guessing right means we do only one syscall, but guessing wrong means we do two. When old_events is 0, ADD is probably right (unless we're hitting the dup bug, when we'll fall back). And when old_events is set and != new_events, MOD is almost certainly right for the same reasons as before. But when old_events is equal to new events, then MOD will work fine unless we closed and reopened the fd, in which case we'll have to fall back to the ADD case. (Redundant del/add pairs are more common than closes for most use cases.) This change lets us avoid calculating new_events, which ought to save a little time in epoll.c | ||
| c281aba3 | 2010-10-24 11:38:29 | Fix a nasty bug related to use of dup() with epoll on Linux Current versions of the Linux kernel don't seem to remove the struct epitem for a given (file,fd) combo when the fd is closed unless the file itself is also completely closed. This means that if you do: fd = dup(fd_orig); add(fd); close(fd); dup2(fd_orig, fd); add(fd); you will get an EEXIST when you should have gotten a success. This could cause warnings and dropped events when using dup and epoll. The solution is pretty simple: when we get an EEXIST from EPOLL_CTL_ADD, we retry with EPOLL_CTL_MOD. Unit test included to demonstrate the bug. Found due to the patient efforts of Gilad Benjamini; diagnosed with help from Nicholas Marriott. | ||
| 0faaee01 | 2010-09-30 23:15:47 | Fix a spurious-call bug on epoll.c We were trying to check whether any events had really been notified on an fd before calling evmap_io_active on it, but instead we were checking for an event pointer, which was always true. In practice, this patch shouldn't change much, since epoll_wait shouldn't return an event unless there is actually an event going on. Spotted by an anonymous bug reporter on Sourceforge. Closes bug 3078425. | ||
| ec2b05ed | 2010-09-21 22:23:32 | Make debugging output for epoll backend more comprehensive | ||
| 4858b794 | 2010-09-15 01:54:51 | Remove the now-useless evsig_caught and evsig_process | ||
| ec347b92 | 2010-07-07 16:45:03 | Move event-config.h to include/event2 This change means that all required include files are in event2, and all files not in event2/* are optional. |