Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Apr 2020 03:46:41 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 229741] kevent is not properly adding EVFILT_READ and EVFILT_WRITE for unix sockets when used in one call
Message-ID:  <bug-229741-227-QaUcHOKZrq@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-229741-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-229741-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D229741

--- Comment #4 from commit-hook@freebsd.org ---
A commit references this bug:

Author: kevans
Date: Wed Apr 22 03:45:52 UTC 2020
New revision: 360182
URL: https://svnweb.freebsd.org/changeset/base/360182

Log:
  kqueue(2): add a note about EV_RECEIPT

  In the below-referenced PR, a case is attached of a simple reproducer that
  exhibits suboptimal behavior: EVFILT_READ and EVFILT_WRITE being set in t=
he
  same kevent(2) call will only honor the first one. This is, in-fact, how
  it's supposed to work.

  A read of the manpage leads me to believe we could be more clear about th=
is;
  right now there's a logical leap to make in the relevant statement: "When
  passed as input, it forces EV_ERROR to always be returned." -- the logical
  leap being that this indicates the caller should have allocated space for
  the change to be returned with EV_ERROR indicated in the events, or
  subsequent filters will get dropped on the floor.

  Another possible workaround that accomplishes similar effect without need=
ing
  space for all events is just setting EV_RECEIPT on the final change being
  passed in; if any errored before it, the kqueue would not be drained. If =
we
  made it to the final change with EV_RECEIPT set, then we would return that
  one with EV_ERROR and still not drain the kqueue. This would seem to not =
be
  all that advisable.

  PR:           229741
  MFC after:    1 week

Changes:
  head/lib/libc/sys/kqueue.2

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-229741-227-QaUcHOKZrq>