Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Nov 2003 09:58:15 +0100 (CET)
From:      Jaromir Dolecek <jdolecek@NetBSD.org>
To:        marius@monkey.org
Cc:        tech-kern@NetBSD.org
Subject:   Re: kqueue, NOTE_EOF
Message-ID:  <200311120858.hAC8wFfg001905@s102-n054.tele2.cz>
In-Reply-To: <20031110174109.GA13852@monkey.org>

next in thread | previous in thread | raw e-mail | index | archive | help
marius aamodt eriksen wrote:
> hi - 
> 
> in order to be able to preserve consistent semantics across poll,
> select, and kqueue (EVFILT_READ), i propose the following change: on
> EVFILT_READ, add an fflag NOTE_EOF which will return when the file
> pointer *is* at the end of the file (effectively always returning on
> EVFILT_READ, but setting the NOTE_EOF flag when it is at the end).
> 
> specifically, this allows libevent[1] to behave consistently across
> underlying polling infrastructures (this has become a practical
> issue).

I'm not sure I understand what is the exact issue.
 
Why would this be necessary or what does this exactly solve? AFAIK
poll() doesn't set any flags in this case neither, so I don't
see how this is inconsistent.

BTW, shouldn't the EOF flag be cleared when the file is extended?

Jaromir
-- 
Jaromir Dolecek <jdolecek@NetBSD.org>            http://www.NetBSD.cz/
-=- We should be mindful of the potential goal, but as the Buddhist -=-
-=- masters say, ``You may notice during meditation that you        -=-
-=- sometimes levitate or glow.   Do not let this distract you.''   -=-



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200311120858.hAC8wFfg001905>