From owner-freebsd-questions Wed Jun 19 13:50:45 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id NAA20202 for questions-outgoing; Wed, 19 Jun 1996 13:50:45 -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 NAA19107 for ; Wed, 19 Jun 1996 13:44:37 -0700 (PDT) Received: (from fqueries@localhost) by jraynard.demon.co.uk (8.7.5/8.6.12) id OAA20866; Wed, 19 Jun 1996 14:12:12 GMT Date: Wed, 19 Jun 1996 14:12:12 GMT Message-Id: <199606191412.OAA20866@jraynard.demon.co.uk> From: James Raynard To: trig@netlink.co.uk CC: questions@freebsd.org In-reply-to: (trig@netlink.co.uk) Subject: Re: Max first parameter of a Select call? Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I wrote:- > In any case, the number of file descriptors a process can have open is > limited by OPEN_MAX, which is 64 on FreeBSD:- Sorry folks, that was complete Horlicks:- $ cat temp.c #include #include main() { int i = 1; for (;;) { if (dup(0) < 0) { printf("dup failed with i = %d\n", i); perror("dup"); break; } i++; } return 0; } $ gcc temp.c $ ulimit -n 64 $ ./a.out dup failed with i = 61 dup: Too many open files $ ulimit -n unlimited $ ulimit -n 360 $ ./a.out dup failed with i = 357 dup: Too many open files $ Next time, I'll try to look at the shell limits *before* posting 8-( -- James Raynard, Edinburgh, Scotland james@jraynard.demon.co.uk