From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 12 09:27:51 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D6B416A4DB for ; Wed, 12 Nov 2003 09:27:51 -0800 (PST) Received: from mail.netbsd.org (mail.isc.netbsd.org [204.152.185.212]) by mx1.FreeBSD.org (Postfix) with SMTP id DCD2943FB1 for ; Wed, 12 Nov 2003 09:27:50 -0800 (PST) (envelope-from wrstuden@netbsd.org) Received: (qmail 11000 invoked by uid 1130); 12 Nov 2003 17:27:50 -0000 Date: Wed, 12 Nov 2003 09:27:50 -0800 From: Bill Studenmund To: Jaromir Dolecek Message-ID: <20031112172750.GB14368@netbsd.org> References: <20031110174109.GA13852@monkey.org> <200311120858.hAC8wFfg001905@s102-n054.tele2.cz> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="St7VIuEGZ6dlpu13" Content-Disposition: inline In-Reply-To: <200311120858.hAC8wFfg001905@s102-n054.tele2.cz> User-Agent: Mutt/1.4.1i cc: freebsd-hackers@freebsd.org cc: tech-kern@NetBSD.org cc: Niels Provos cc: marius@monkey.org cc: hackers@openbsd.org Subject: Re: kqueue, NOTE_EOF X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2003 17:27:51 -0000 --St7VIuEGZ6dlpu13 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 12, 2003 at 09:58:15AM +0100, Jaromir Dolecek wrote: > marius aamodt eriksen wrote: > > hi -=20 > >=20 > > 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). > >=20 > > specifically, this allows libevent[1] to behave consistently across > > underlying polling infrastructures (this has become a practical > > issue). >=20 > 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=20 know that poll() will give you a read-availability event, so you'll read=20 the EOF. Will kqueue? > BTW, shouldn't the EOF flag be cleared when the file is extended? Probably. Take care, Bill --St7VIuEGZ6dlpu13 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (NetBSD) iD8DBQE/sm2VWz+3JHUci9cRAn21AJ92dWa5pTIsSiWOXerBOsAjNjYj7ACfZdXH ZGm/kil/juuS7l/6YyZF6X8= =8LPL -----END PGP SIGNATURE----- --St7VIuEGZ6dlpu13--