[Bug 203366] kevent: EV_CLEAR on fifo does not work correctly

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Feb 29 19:20:25 UTC 2016


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

--- Comment #4 from Mark Johnston <markj at FreeBSD.org> ---
Created attachment 167574
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=167574&action=edit
patch

I think the patch isn't completely correct based on my interpretation of the
kevent man page: if EV_EOF isn't already set, we want to activate the knote,
even if EV_CLEAR is specified. That is, we should get an event if the remote
side closes the FIFO. Once EV_EOF has been returned once, EV_CLEAR should clear
it.

To see the difference with the first patch, try trussing a tail -f <fifo> and
run "(echo a; sleep 1) > <fifo>".

That suggests something like the attached diff.

The kevent man page also documents similar behaviour for EVFILE_WRITE, so
filt_pipewrite() should be fixed as well for completeness.

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


More information about the freebsd-bugs mailing list