kc3-lang/libevent/evmap.c

Branch :


Log

Author Commit Date CI Message
bd817009 2019-04-24 22:54:04 Prevent endless loop in evmap_make_space. If slot is larger than INT_MAX / 2, then the loop which increases nentries until it is larger than slot would never return. Also make sure that nentries * msize will never overflow INT_MAX. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
4a1088ba 2019-04-22 19:58:56 Enforce limit of NSIG signals. It doesn't make sense to allow a signal number higher than NSIG. The NSIG check already exists in signal.c for internally used functions. As this is a programming error of libevent consumers, this is a purely defensive mechanism. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
74c10894 2019-01-29 21:31:19 evmap: use approparite type for changes to avoid warnings under windows
a1293bd2 2018-10-30 23:59:24 Preserve ET bit for backends with changelist
b77d3e78 2018-10-30 08:50:08 Epoll ET setting lost with multiple events for same fd After two or more events have been registered for the same file descriptor using EV_ET, if one of the events is deleted, then the epoll_ctl() call issued by libevent drops the EPOLLET flag resulting in level triggered notifications. [ azat: use existing "et" in the evmap_io_del_() ]
b1b69ac7 2014-01-17 23:20:42 Implemented EV_CLOSED event for epoll backend (EPOLLRDHUP). - Added new EV_CLOSED event - detects premature connection close by clients without the necessity of reading all the pending data. Does not depend on EV_READ and/or EV_WRITE. - Added new EV_FEATURE_EARLY_CLOSED feature for epoll. Must be supported for listening to EV_CLOSED event. - Added new regression test: test-closed.c - All regression tests passed (test/regress and test/test.sh) - strace output of test-closed using EV_CLOSED: socketpair(PF_LOCAL, SOCK_STREAM, 0, [6, 7]) = 0 sendto(6, "test string\0", 12, 0, NULL, 0) = 12 shutdown(6, SHUT_WR) = 0 epoll_ctl(3, EPOLL_CTL_ADD, 7, {EPOLLRDHUP, {u32=7, u64=7}}) = 0 epoll_wait(3, {{EPOLLRDHUP, {u32=7, u64=7}}}, 32, 3000) = 1 epoll_ctl(3, EPOLL_CTL_MOD, 7, {EPOLLRDHUP, {u32=7, u64=7}}) = 0 fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 4), ...}) mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYM... write(1, "closed_cb: detected connection close "..., 45) = 45
974c60e1 2013-12-21 23:15:28 Refactor evmap_{io,signal}_active_() to tolerate bad inputs
ebfd8a89 2013-09-04 14:25:11 Fix reinit of fds with EV_WRITE but not EV_READ. Bugfix on 2.1.1-alpha.
9b5a527f 2013-05-16 16:38:39 If evsel->del() fails, don't leave the evmap in an inconsistent state. This fixes assertion failures in cases where epoll() fails with EBADF -- the root cause for which is as of yet unknown. It seems something (OpenSSL?) is closing the file descriptor under our feet.
232055ef 2012-09-07 09:58:24 Tweak patch for event_base_foreach_event() * Fix whitespace * Explain return value from callback function * Reinstate return value so that caller can tell whether forech exited early. * Rename event_base_foreach_event_() to event_base_foreach_event_nolock_(). * Use event_base_foreach_event_cb_fn typedef in more places * Be more dire about undefined behavior.