Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Jun 1996 21:53:50 +0100
From:      "Gary Palmer" <gpalmer@freebsd.org>
To:        James Raynard <fqueries@jraynard.demon.co.uk>
Cc:        af@biomath.jussieu.fr, freebsd-questions@freebsd.org
Subject:   Re: Max first parameter of a Select call? 
Message-ID:  <7073.835304030@palmer.demon.co.uk>
In-Reply-To: Your message of "Wed, 19 Jun 1996 14:04:20 GMT." <199606191404.OAA20852@jraynard.demon.co.uk> 

next in thread | previous in thread | raw e-mail | index | archive | help
James Raynard wrote in message ID
<199606191404.OAA20852@jraynard.demon.co.uk>:
> However, <sys/types.h> is a copy of the types.h used in compiling the
> kernel, which is where the kernel picks up its value of FD_SETSIZE
> from. So a user program can never safely use FD_SETSIZE > 256 without
> a kernel re-compile first!

It can actually, you get get an error back if you try to set the
number of FD's you want to scan (the `nfds' parameter) to be greater
than the value of FD_SETSIZE when the kernel was compiled (at least,
that's how -stable works, and from a quick glance -current seems the
same).

The real answer is to make it dynamic and dependant on a read-only
sysctl variable or something ... I'm not sure if the bitmap's required
by the code will be that forgiving tho :-(

Gary
--
Gary Palmer                                          FreeBSD Core Team Member
FreeBSD: Turning PC's into workstations. See http://www.FreeBSD.ORG/ for info



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7073.835304030>