From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 12 00:58:17 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 6867F16A4CE for ; Wed, 12 Nov 2003 00:58:17 -0800 (PST) Received: from t2s5.tele2.cz (t2s5.tele2.cz [213.246.64.40]) by mx1.FreeBSD.org (Postfix) with SMTP id B8E3743F85 for ; Wed, 12 Nov 2003 00:58:15 -0800 (PST) (envelope-from dolecek@s102-n054.tele2.cz) Received: (qmail 5433 invoked from network); 12 Nov 2003 08:58:09 -0000 Received: from s102-n054.tele2.cz (213.246.102.54) by t2s5.tele2.cz with SMTP; 12 Nov 2003 08:58:09 -0000 Received: (from dolecek@localhost) by s102-n054.tele2.cz (8.12.9p1/8.12.9/Submit) id hAC8wFfg001905; Wed, 12 Nov 2003 09:58:15 +0100 (CET) From: Jaromir Dolecek Message-Id: <200311120858.hAC8wFfg001905@s102-n054.tele2.cz> In-Reply-To: <20031110174109.GA13852@monkey.org> To: marius@monkey.org Date: Wed, 12 Nov 2003 09:58:15 +0100 (CET) X-Mailer: ELM [version 2.4ME+ PL93 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII cc: freebsd-hackers@freebsd.org cc: Niels Provos cc: hackers@openbsd.org cc: tech-kern@NetBSD.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 08:58:17 -0000 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 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.'' -=-