NetBSD Problem Report #281
From gnats Sun Jun 5 23:47:36 1994
Received: from idefix.laas.fr (idefix.laas.fr [140.93.160.12]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with SMTP id XAA17979 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Sun, 5 Jun 1994 23:47:35 -0700
Message-Id: <9406060645.AA08248@elwood.laas.fr>
Date: Mon, 6 Jun 1994 08:45:32 --100
From: matthieu@laas.fr (Matthieu Herrb)
To: gnats-bugs@sun-lamp.cs.berkeley.edu
Subject: select(getdtablesize(),...) returns EINVAL
X-Send-Pr-Version: 3.2
>Number: 281
>Category: kern
>Synopsis: select(getdtablesize(),...) returns EINVAL
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: gnats-admin
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sun Jun 05 23:50:00 +0000 1994
>Closed-Date: Wed Mar 22 17:29:37 +0000 1995
>Last-Modified: Sun Sep 14 18:06:26 +0000 2014
>Originator: Matthieu Herrb
>Release: 94/05/27
>Organization:
"LAAS/CNRS (Toulouse France)"
>Environment:
System: NetBSD cougar 0.9B NetBSD 0.9B (COUGAR) #0: Sat May 28 17:01:51 MET DST 1994 matthieu@cougar:/usr/src/sys/arch/i386/compile/COUGAR i386
>Description:
With a standard kernel, the max number of file descriptors per process
is greater than FD_SETSIZE.
So programs that use getdtablesize() return value as 1st argument in
select() allways see it fail with errno set to EINVAL.
>How-To-Repeat:
select(getdtablesize(), NULL, NULL, NULL, NULL);
>Fix:
Either:
1. Augment the default FD_SETSIZE value
2. Silently ignore too big values for select() first
argument (in src/sys/kern/sys_generic.c:517
3. At least document it in select() man page.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->suspended
State-Changed-By: mycroft
State-Changed-When: Fri Jan 20 11:54:01 PST 1995
State-Changed-Why:
This cannot be fixed. select(2) is inherently broken.
State-Changed-From-To: suspended->closed
State-Changed-By: mycroft
State-Changed-When: Wed Mar 22 09:29:37 PST 1995
State-Changed-Why:
Garbage collecting this PR, as this is not a bug.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.