summaryrefslogtreecommitdiff
path: root/lib/libevent/kqueue.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2012-02-08 09:01:01 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2012-02-08 09:01:01 +0000
commit30b39b93119d42772250d26c7e44296a4985df13 (patch)
tree95d4fc0360b2109a1bf47b3067c12aeec9dbb2c5 /lib/libevent/kqueue.c
parentb6de2da2a1714f8a8845dd45dbb753a2f37cd659 (diff)
r1.27 changed libevent to fire a read event when kqueue returned EBADF
(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@.
Diffstat (limited to 'lib/libevent/kqueue.c')
-rw-r--r--lib/libevent/kqueue.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libevent/kqueue.c b/lib/libevent/kqueue.c
index 60e6a9bc02b..c0ba8cbc91e 100644
--- a/lib/libevent/kqueue.c
+++ b/lib/libevent/kqueue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kqueue.c,v 1.27 2012/01/30 09:45:34 nicm Exp $ */
+/* $OpenBSD: kqueue.c,v 1.28 2012/02/08 09:01:00 nicm Exp $ */
/*
* Copyright 2000-2002 Niels Provos <provos@citi.umich.edu>
@@ -263,6 +263,7 @@ kq_dispatch(struct event_base *base, void *arg, struct timeval *tv)
* occur on an add if the fd was one side of a pipe,
* and the other side was closed. */
case EBADF:
+ continue;
/* These two can occur on an add if the fd was one side
* of a pipe, and the other side was closed. */
case EPERM: