git: DragonFly_RELEASE_6_0 kernel - Implement POLLHUP for pipes and filesystem fifos (3)
Matthew Dillon
dillon at crater.dragonflybsd.org
Thu May 13 10:46:41 PDT 2021
commit d59f66a768bcc260881c151dc8e40eacc64035ec
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Thu May 13 10:37:03 2021 -0700
kernel - Implement POLLHUP for pipes and filesystem fifos (3)
* Add an internal NOTE_HUPONLY flag to allow the poll() system call
to tell the kevent system that EVFILT_READ should only trigger on
a HUP and not trigger on read-data-present.
* Linux does not trigger POLLHUP on a half-closed socket, make
DFly have the same behavior. POLLHUP is only triggered on a fully-closed
socket.
* Fix bug where data-present on the pipe, socket, or fifo would trigger an
EVFILT_READ event when only a HUP is being requested. This caused our
poll() implementation to complain about spurious events (which then
results in incorrect operation).
Summary of changes:
sys/kern/sys_generic.c | 14 ++++++++++----
sys/kern/sys_pipe.c | 2 +-
sys/kern/uipc_socket.c | 37 ++++++++++++++++++++++++++++++-------
sys/sys/event.h | 9 +++++++--
sys/vfs/fifofs/fifo_vnops.c | 4 +++-
5 files changed, 51 insertions(+), 15 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/d59f66a768bcc260881c151dc8e40eacc64035ec
--
DragonFly BSD source repository
More information about the Commits
mailing list