From owner-freebsd-hackers Mon Nov 16 18:32:12 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA27606 for freebsd-hackers-outgoing; Mon, 16 Nov 1998 18:32:12 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from smtp04.primenet.com (smtp04.primenet.com [206.165.6.134]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA27543 for ; Mon, 16 Nov 1998 18:32:09 -0800 (PST) (envelope-from tlambert@usr05.primenet.com) Received: (from daemon@localhost) by smtp04.primenet.com (8.8.8/8.8.8) id TAA12062; Mon, 16 Nov 1998 19:31:44 -0700 (MST) Received: from usr05.primenet.com(206.165.6.205) via SMTP by smtp04.primenet.com, id smtpd012048; Mon Nov 16 19:31:42 1998 Received: (from tlambert@localhost) by usr05.primenet.com (8.8.5/8.8.5) id TAA05161; Mon, 16 Nov 1998 19:31:36 -0700 (MST) From: Terry Lambert Message-Id: <199811170231.TAA05161@usr05.primenet.com> Subject: Re: Supporting more than FD_SETSIZE fd's To: bakul@torrentnet.com (Bakul Shah) Date: Tue, 17 Nov 1998 02:31:36 +0000 (GMT) Cc: tlambert@primenet.com, hackers@FreeBSD.ORG In-Reply-To: <199811162237.RAA02348@chai.torrentnet.com> from "Bakul Shah" at Nov 16, 98 05:37:14 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > The problem that normally occurs in naieve net code is this: > > > cnt = getdtablesize(); > > select( cnt + 1, ...) > > If you read carefully this is not what I am advocating. I know; I was just noting the common problem that crops up when people see code like yo posted and try to imitate it from memory. > > > Basically fd_set should have never been defined. > > > > Definitely agree. But... it's *still* stupid to call select with > > a count that includes unallocated descriptors. > > You are preaching to the converted :-) Yah; just wanted to note that even though it should never have been defined, it having never been defined is not an excuse to do the wrong thing... I think I'm familiar with the section of code that Nate is concerned with; I think by default that it does the wrong thing. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message