From owner-freebsd-hackers Wed Nov 11 11:03:29 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA20719 for freebsd-hackers-outgoing; Wed, 11 Nov 1998 11:03:29 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from ns.mt.sri.com (sri-gw.MT.net [206.127.105.141]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA20712 for ; Wed, 11 Nov 1998 11:03:27 -0800 (PST) (envelope-from nate@mt.sri.com) Received: from mt.sri.com (rocky.mt.sri.com [206.127.76.100]) by ns.mt.sri.com (8.8.8/8.8.8) with SMTP id MAA26688; Wed, 11 Nov 1998 12:03:09 -0700 (MST) (envelope-from nate@rocky.mt.sri.com) Received: by mt.sri.com (SMI-8.6/SMI-SVR4) id MAA18067; Wed, 11 Nov 1998 12:03:08 -0700 Date: Wed, 11 Nov 1998 12:03:08 -0700 Message-Id: <199811111903.MAA18067@mt.sri.com> From: Nate Williams MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Bakul Shah Cc: Nate Williams , hackers@FreeBSD.ORG Subject: Re: Supporting more than FD_SETSIZE fd's In-Reply-To: <199811111859.NAA26093@chai.torrentnet.com> References: <199811111721.KAA17285@mt.sri.com> <199811111859.NAA26093@chai.torrentnet.com> X-Mailer: VM 6.34 under 19.16 "Lille" XEmacs Lucid Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > > int fd_setsize = getdtablesize(); > > > int fd_tablesize = howmany(max_fd_count, NFDBITS); > > > Where is max_fd_count defined? > > Oops! I forgot to fix the second line above when I renamed > max_fd_count to fd_setsize. > > BTW, getrlimit(RLIMIT_NOFILE, &fd_setsize) is a better choice > than getdtablesize(). > > > I tried doing this, but ended up with a core dump. Unfortunately, I ran > > out of time to work on it this week (real work calls), but I'll look > > into doing this this weekend. However, if someone has already done this > > I'm more than willing to accept example code. :) :) > > The code fragment I showed is approx. right as I've used > something similar a couple of times before but I will try to > turn it into a working example over the weekend. Thanks. If it included the MACROS so much the better. :) :) :) Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message