From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 8 01:18: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 B71BA16A4BF for ; Mon, 8 Sep 2003 01:18:17 -0700 (PDT) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 513AA43F85 for ; Mon, 8 Sep 2003 01:18:16 -0700 (PDT) (envelope-from marck@rinet.ru) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.12.9/8.12.9) with ESMTP id h888IEqv056520; Mon, 8 Sep 2003 12:18:15 +0400 (MSD) (envelope-from marck@rinet.ru) Date: Mon, 8 Sep 2003 12:18:14 +0400 (MSD) From: Dmitry Morozovsky To: Lev Walkin In-Reply-To: <3F5C39B3.2010001@netli.com> Message-ID: <20030908121326.R55683@woozle.rinet.ru> References: <20030907233940.M18589@woozle.rinet.ru> <3F5BB991.2050601@netli.com> <20030908113632.R55683@woozle.rinet.ru> <3F5C3549.8050607@netli.com> <20030908120036.V55683@woozle.rinet.ru> <3F5C39B3.2010001@netli.com> X-NCC-RegID: ru.rinet MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: hackers@freebsd.org Subject: Re: if bpf fd's select()able? 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: Mon, 08 Sep 2003 08:18:17 -0000 On Mon, 8 Sep 2003, Lev Walkin wrote: LW> > However, I found a (really stupid, yeah) bug: the first parameter of select() LW> > in this test case should be fd+1, not 1 ;-) LW> LW> Unfortunately, this could not possibly be the case, if your system's LW> documentation is in sync with the reality: LW> LW> === select(2) === LW> For historical reasons, LW> select() will always examine the first 256 descriptors. LW> === cut === Well, I suppose either this part of the documentation is obsolete, or something else went wrong, but: this select() works with fd+1 on both 4.8-R and 4.9-PRE, and does not work with both 1 and fd as nfd. I check the fd to be 3 in all cases. I did not dig into select() sources yet, though. Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------