summaryrefslogtreecommitdiffstats
path: root/lib/libevent/kqueue.c
AgeCommit message (Collapse)AuthorFilesLines
2019-05-08Fixed integer overflow with an excessively large amount of events.tobias1-10/+15
While at it: KNF and switch from reallocarray to recallocarray. ok tedu
2017-07-10if there are no changes for kevent, pass in NULL instead.tedu1-2/+2
this has no effect except to make ktrace output prettier. ok bluhm mpi
2016-09-03Remove NULL pointer checks before calls to free().nayden1-5/+3
OK bluhm@ nicm@
2015-12-25revert change to call kevent immediately.tedu1-6/+65
tcpbench (at a minimum) relies on the old behavior of changes all happening after all event handlers run. in particular, it resets the event for the listening socket *before* calling accept(), when it is still readable. kevent then (correctly) says it is readable on the next go through the loop. silly, subtle, and stupid. problem reported by kettenis
2015-12-16change the kqueue backend to call kevent() as events are added insteadtedu1-65/+6
of deferring until the dispatch loop. kqueue support for various types of files and filesystems has been historically incomplete, and kevent handles this condition by returning an error. the libevent dispatch loop has no way to recover from this error and fails catastrophically, bringing down the entire process because one file went bad. now, instead of all that happending, event_add will return an error. the application can choose to handle or ignore this error, but at least the band will play on. ok nicm
2014-10-30Fix whitespace errors in libevent.bluhm1-15/+15
OK nicm@
2014-10-29After removing all the #ifdef, the wrappers in evutil are ratherbluhm1-2/+2
useless. Let libevent call the libc functions directly. OK nicm@
2014-10-29Remove workaround for Mac OS X kqueue bug.bluhm1-22/+1
OK nicm@
2014-10-18Remove some #ifdef from libevent.bluhm1-15/+4
OK nicm@
2014-10-18Remove the remaining #ifdef HAVE_ and the #define _GNU_SOURCE.bluhm1-3/+1
OK nicm@
2014-10-17Remove #ifdef HAVE_.*_H, just include the header files.bluhm1-8/+3
Do not include sys/param.h. OK nicm@
2014-10-16Remove #ifdef HAVE_CONFIG_H, there is no config.h file.bluhm1-4/+1
OK nicm@
2014-10-08use reallocarray() to detect multiplicative integer overflow; obviousderaadt1-5/+5
pattern. This commit does not fix the non-obvious bloody horror of select.c.
2012-02-08r1.27 changed libevent to fire a read event when kqueue returned EBADFnicm1-1/+2
(and several other things, particularly EPIPE) on a file descriptor. This causes Google Chrome to die (probably due to a bug in Chrome but finding that is next to impossible at the moment). It's not really clear what libevent should when an invalid fd is added - the poll backend doesn't fire an event and select exits the event loop. Until this is settled, change kqueue to match poll and ignore EBADF, keeping the behaviour r1.27 fixed on EPIPE. Fix from robert@.
2012-01-30Handle a wider range of kqueue error return values for an event,nicm1-20/+39
prevents libevent exiting the event loop when getting EPIPE. Problem first seen by drahn@ and more recently hit by gilles@, fix based on one by Nick Mathewson. ok gilles
2010-07-12Update to 1.4.14b.nicm1-3/+7
From their change log: o Fix memory-leak of signal handler array with kqueue. [backport] o Make evutil_make_socket_nonblocking() leave any other flags alone. o Adjusted fcntl() retval comparison on evutil_make_socket_nonblocking(). o Re-add event_siglcb; some old code _was_ still using it. :( o Fix a free(NULL) in min_heap.h o Clean up properly when adding a signal handler fails. Also a local change to use an int rather than a long for fcntl(). ok guenther deraadt
2010-04-21Update libevent to 1.4.13.nicm1-65/+96
This is the core library only, the DNS parts are removed and it does not include the other extra bits (HTTP, DNS, and RPC), a separate port for these will appear in due course. Thanks to jsg, sthen, alek, gilles, jacekm, bernd and any others I've forgotten for testing/comments. Note that /usr/include/evdns.h should be removed after updating. ok deraadt
2008-05-02Update to libevent 1.3e while retaining our local changes.brad1-14/+20
"No objection" millert@ "the diff looks and works fine" reyk@
2007-09-02use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsgderaadt1-3/+3
2007-03-19Update to libevent-1.3b while retaining our local changes. beck@ OKmillert1-8/+8
2006-11-05typo in kqueue delete.brad1-2/+2
From Niels Provos via the libevent SVN repo, by Bert JW. Regeer ok deraadt@
2006-03-30introduce a way to free the base.brad1-2/+19
From libevent CVS
2005-12-20do not remove kq inkernel flag before event_del gets to it;brad1-4/+2
From libevent CVS ok deraadt@
2005-07-02zap trailing whitespaces, no binary changegrunk1-4/+4
ok brad@ beck@
2005-06-18update to libevent 1.1a; keep local changesbrad1-1/+25
ok grunk@
2005-05-04update to libevent 1.0d; keep local changesbrad1-1/+2
thanks to Alexander von Gernler for testing and some bug fixes ok mpf@ norby@
2005-04-22update to libevent 1.0c; keep local changesbrad1-34/+29
no shared lib so no ABI/API check is necessary thanks to Alexander von Gernler for submitting another diff in an attempt to update libevent and for a use-after-free fix. ok henning@ deraadt@
2005-04-19backout. not discussed, and very wrong. bad bradderaadt1-29/+34
2005-04-19update to libevent 1.0c; keep local changesbrad1-34/+29
2004-04-28update to libevent 0.8; keep local changesbrad1-21/+21
ok markus@
2004-01-05support NOTE_EOF; from marius aamodt eriksen; ok tedu, millertmarkus1-1/+3
2003-07-09update to libevent-0.7a.tar.gz; keep local changesmarkus1-38/+35
2003-06-19constify constant structures; niels okmickey1-2/+2
2003-06-03do not honour getenv of EVENT_NOKQUEUE is issetugid; millert henning okderaadt1-2/+2
2003-03-10duplicate words and spelling fixes in commentsdavid1-3/+3
ok miod@
2002-09-08typo. from marius@umich.edu via provositojun1-4/+4
2002-07-10Make EV_PERSIST work on EV_READ and EV_WRITE events.art1-3/+7
provos@ ok.
2002-06-25rcsidsmickey1-0/+2
2002-06-19rename variable so that scoping is more obviousprovos1-3/+3
2002-06-18need string.hderaadt1-0/+1
2002-06-15import libevent an event notification abstraction on top of select or kqueueprovos1-0/+372
supporting timeout and signal callsbacks, too. okay deraadt@ millert@