[Bug 224615] [PATCH] kevent: EVFILT_READ returns EV_EOF on named pipe when it should not

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Apr 27 15:59:51 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224615

--- Comment #6 from commit-hook at freebsd.org ---
A commit references this bug:

Author: markj
Date: Mon Apr 27 15:59:20 UTC 2020
New revision: 360380
URL: https://svnweb.freebsd.org/changeset/base/360380

Log:
  Fix handling of EV_EOF for named pipes.

  Contrary to the kevent man page, EV_EOF on a fifo is not cleared by
  EV_CLEAR.  Modify the read and write filters to clear EV_EOF when the
  fifo's PIPE_EOF flag is clear, and update the man page to document the
  new behaviour.

  Modify the write filter to return the amount of buffer space available
  even if no readers are present.  This matches the behaviour for sockets.

  When reading from a pipe, only call pipeselwakeup() if some data was
  actually read.  This prevents the continuous re-triggering of a
  EVFILT_READ event on EOF when in edge-triggered mode.

  PR:           203366, 224615
  Submitted by: Jan Kokem?ller <jan.kokemueller at gmail.com>
  MFC after:    2 weeks
  Differential Revision:        https://reviews.freebsd.org/D24528

Changes:
  head/lib/libc/sys/kqueue.2
  head/sys/kern/sys_pipe.c

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the freebsd-bugs mailing list