From owner-freebsd-hackers Thu Sep 26 23:12:54 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id XAA23032 for hackers-outgoing; Thu, 26 Sep 1996 23:12:54 -0700 (PDT) Received: from genesis.atrad.adelaide.edu.au (genesis.atrad.adelaide.edu.au [129.127.96.120]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id XAA22980 for ; Thu, 26 Sep 1996 23:12:50 -0700 (PDT) Received: from msmith@localhost by genesis.atrad.adelaide.edu.au (8.6.12/8.6.9) id PAA19209; Fri, 27 Sep 1996 15:42:23 +0930 From: Michael Smith Message-Id: <199609270612.PAA19209@genesis.atrad.adelaide.edu.au> Subject: Re: OPEN_MAX => which #define counts? To: mark@quickweb.com (Mark Mayo) Date: Fri, 27 Sep 1996 15:42:22 +0930 (CST) Cc: hackers@FreeBSD.ORG In-Reply-To: from "Mark Mayo" at Sep 27, 96 01:14:34 am MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Mark Mayo stands accused of saying: > > Hi, I was poking around /usr/src/sys wondering about OPEN_MAX ... I'm just > learning about file descriptors and such and I figured out that OPEN_MAX > determines the max num. of files a process can open. > > My question is that which #define actually sets the limit: > > ./conf/options:OPEN_MAX opt_rlimit.h ---> which contains nothing.. > ./i386/conf/LINT:options OPEN_MAX=128 > ./sys/syslimits.h:#define OPEN_MAX 64 > > The other question I have is how OPEN_MAX relates to the max. number of > file secriptors the System can have open at a time. 'sysctl kern.maxfiles' will tell you how many files the system can have open. 'limit descriptors' (csh) getrlimit()/setrlimit() (system calls) let you frob on a per-process basis. > -Mark -- ]] Mike Smith, Software Engineer msmith@atrad.adelaide.edu.au [[ ]] Genesis Software genesis@atrad.adelaide.edu.au [[ ]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[ ]] realtime instrument control (ph/fax) +61-8-267-3039 [[ ]] Collector of old Unix hardware. "Where are your PEZ?" The Tick [[