From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 13 02:04:05 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 238D016A4CF for ; Thu, 13 Nov 2003 02:04:05 -0800 (PST) Received: from Sparkle.Rodents.Montreal.QC.CA (Sparkle.Rodents.Montreal.QC.CA [216.46.5.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id D358443FE0 for ; Thu, 13 Nov 2003 02:04:03 -0800 (PST) (envelope-from mouse@Sparkle.Rodents.Montreal.QC.CA) Received: (from mouse@localhost) by Sparkle.Rodents.Montreal.QC.CA (8.8.8/8.8.8) id FAA25087; Thu, 13 Nov 2003 05:04:01 -0500 (EST) From: der Mouse Message-Id: <200311131004.FAA25087@Sparkle.Rodents.Montreal.QC.CA> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Erik-Conspiracy: There is no Conspiracy - and if there were I wouldn't be part of it anyway. Date: Thu, 13 Nov 2003 04:56:42 -0500 (EST) To: hackers@openbsd.org, tech-kern@NetBSD.org, freebsd-hackers@freebsd.org In-Reply-To: <200311130926.hAD9Q3jv024862@s102-n054.tele2.cz> References: <200311130926.hAD9Q3jv024862@s102-n054.tele2.cz> 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: Thu, 13 Nov 2003 10:04:05 -0000 >> 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? > AFAIK yes for sockets, not for file descriptor (i.e. descriptor open > to a file on filesystem). Would poll() give you read-availability > event when on end of file on filesystem. IMO it should, since a read() wouldn't block. When I tried it (admittedly against a rather old kernel) it does. /~\ The ASCII der Mouse \ / Ribbon Campaign X Against HTML mouse@rodents.montreal.qc.ca / \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B