Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Oct 1995 21:26:16 +0100
From:      volf@oasis.IAEhv.nl (Frank Volf)
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   kern/781: MAX_OPEN and FD_SETSIZE
Message-ID:  <199510142026.VAA01503@oasis>
Resent-Message-ID: <199510142030.NAA16913@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         781
>Category:       kern
>Synopsis:       OPEN_MAX in kernel config and FD_SETSIZE in /usr/include/sys/types.h mismatch
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 14 13:30:01 PDT 1995
>Last-Modified:
>Originator:     Frank Volf
>Organization:
 ----------------------------------------------------------------------------
       Frank Volf - Internet Access Eindhoven - Digitale Stad Eindhoven 
 ----------------------------------------------------------------------------
  ||  volf@oasis.IAEhv.nl - use for personal mail                         ||
  ||  volf@IAEhv.nl - use for Internet Access Eindhoven related mail      ||
  ||  volf@dse.dse.nl - use for Digital City of Eindhoven related mail    ||
 ----------------------------------------------------------------------------
    IAE Public Access Unix System - Dial +31.40.2439436 and login as new.  
 ----------------------------------------------------------------------------
>Release:        FreeBSD 2.0-BUILT-19950603 i386
>Environment:

	FreeBSD 2.0.5 from CD, nothing fancy in the kernel config

>Description:

	The OPEN_MAX define in the kernel configuration can be used to have
	a large number of open file descriptors (e.g. 512),

	getdtablesize returns the value set by OPEN_MAX (this is ok),

	FD_SETSIZE in /usr/include/sys/types.h is defined as 256.
	sys_generic.c (containing the code for select()) is compiled with 
	this FD_SETSIZE set to 256.
	
	The select() fails at runtime if it is called with a nfds > FD_SETSIZE,
	because it is compiled with the FD_SETSIZE value, and does not 
	know about OPEN_MAX > 256

>How-To-Repeat:

	See above.

>Fix:
	
	Preferable automatic generation of the 	types.h file from kernel 
	configuration by /usr/sbin/config.


Please, let me know the status of this bug report (maybe I did something
wrong).

Frank

>Audit-Trail:
>Unformatted:



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