From owner-freebsd-questions Wed Jun 19 17:18:49 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id RAA04403 for questions-outgoing; Wed, 19 Jun 1996 17:18:49 -0700 (PDT) Received: from jraynard.demon.co.uk (jraynard.demon.co.uk [158.152.42.77]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id RAA04390 for ; Wed, 19 Jun 1996 17:18:25 -0700 (PDT) Received: (from fqueries@localhost) by jraynard.demon.co.uk (8.7.5/8.6.12) id OAA20852; Wed, 19 Jun 1996 14:04:20 GMT Date: Wed, 19 Jun 1996 14:04:20 GMT Message-Id: <199606191404.OAA20852@jraynard.demon.co.uk> From: James Raynard To: af@biomath.jussieu.fr CC: freebsd-questions@freebsd.org In-reply-to: <199606190804.AA28032@iaka.biomath.jussieu.fr> (message from Alain FAUCONNET on Wed, 19 Jun 1996 09:04:52 +0100 (GMT+0100)) Subject: Re: Max first parameter of a Select call? Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > How do you get the 'select' call in FreeBSD to be happy with something > > greater than 256 as a first parameter? > > Anything above this seems to give a "Select error 22 - invalid argument" > > > > Not a reply, just a followup: this "feature" seems to have a lot of > interesting side effects on my machine (2.1-STABLE pre-earthquake). > When I set user resources limits to hard limits ("unlimit" C-shell > command) and the max file descriptors goes >> 256, sudo no longer > works ("Password:" prompt exits immediately), fvwm sets system load at > 1.0 permanently. I have ktraced fvwm and actually saw that select > returning an error. Everything goes back to normal when I set max fd > <= 256. Hmm. As I understand the select() man page, a user program can increase FD_SETSIZE above the value specified in , which just happens to be 256, but not above the value compiled into the kernel. However, 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! Perhaps we need a FD_SETSIZE option in the kernel config file? (I have a vague memory of seeing one once, but there's no record of it in my CVS tree). -- James Raynard, Edinburgh, Scotland james@jraynard.demon.co.uk