Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Feb 2016 19:20:24 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 203366] kevent: EV_CLEAR on fifo does not work correctly
Message-ID:  <bug-203366-8-RKt3WBGm7S@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-203366-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-203366-8@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=3D203366

--- Comment #4 from Mark Johnston <markj@FreeBSD.org> ---
Created attachment 167574
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D167574&action=
=3Dedit
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 c=
lear
it.

To see the difference with the first patch, try trussing a tail -f <fifo> a=
nd
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.

--=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-203366-8-RKt3WBGm7S>