Date: Wed, 12 Nov 2003 09:27:50 -0800 From: Bill Studenmund <wrstuden@netbsd.org> To: Jaromir Dolecek <jdolecek@NetBSD.org> Cc: hackers@openbsd.org Subject: Re: kqueue, NOTE_EOF Message-ID: <20031112172750.GB14368@netbsd.org> In-Reply-To: <200311120858.hAC8wFfg001905@s102-n054.tele2.cz> References: <20031110174109.GA13852@monkey.org> <200311120858.hAC8wFfg001905@s102-n054.tele2.cz>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] On Wed, Nov 12, 2003 at 09:58:15AM +0100, Jaromir Dolecek wrote: > 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. I'm only responding to the notes also. > 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. I think the difference is in the default behavior. When you're at EOF, I know that poll() will give you a read-availability event, so you'll read the EOF. Will kqueue? > BTW, shouldn't the EOF flag be cleared when the file is extended? Probably. Take care, Bill [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (NetBSD) iD8DBQE/sm2VWz+3JHUci9cRAn21AJ92dWa5pTIsSiWOXerBOsAjNjYj7ACfZdXH ZGm/kil/juuS7l/6YyZF6X8= =8LPL -----END PGP SIGNATURE-----help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031112172750.GB14368>
